I have looked through everything I can find on the web, so this must be really easy to do but, I must ask anyway; does MRL use the USB port of the pc to talk to the usb port on the arduino to control to the board; or is a ftdi cable needed to talk to the tx/rx pins of the Arduino.

Is there a wiring diaagram that shows this?

It odd that I could not find a simple statement of this...but I am old!!!!

 

Thaks

Blaine

revwarguy

8 years 5 months ago

Technically, MRL can communicate via just about any serial type of link with the right support invoked, but since arduinos are commonly used and most of those use a COM port over USB as their programming procedure, most people choose to use that to connect MRL to the arduino as well.  

In this way, the arduino is just a front end, or a type of connector, that has servo and sensor inputs on one side, and an USB COM port on the other.  The arduino then does not iniitiate any action on its own, but does so under script control from MRL.

 

I do not seem to alway understand utube help videos, so I created this work flow doc to help me get started.

It all seem to work now, but I do lack an understanding how the python script works in MRL. Also I do not know how to save my setting so I have to start over each time..Oh well, each day brings hope..

 

Work flow – New Arduino for windows

 

·      Hook up Arduino board

o   Attach I/O to board

o   9-volt battery to barrel jack

o   USB to computer

 

·      Check device manager for which port Arduino is connected to.

o   Check port is set to 57600 baud

 

·      Start MyRobotLab

o   From cmd window

o   cd to MyRobotLab working dir.

o   Type java –jar myrobotlab.jar

o   You should see MRL GUI open in new window

o   Go to runtime tab

 

·      Start Service (this example: InMoovHand)

o   Right click on InMoovHand

o   Select start

§  Name your new service (i.e.  hand). You will see tabs created with prefix of your name for the service. So in this example you would see hand.arduino and a collection of more tabs with hand as a prefix

§  Open hand.arduino tab

§  Right mouse click and select all

§  Right mouse click and select copy

 

·      Go to Arduino IDE and open

o   Click Tools -> board (choose your board)

o   Click Tools-> Port (make sure it is set to the correct port)

o   Click on default sketch and while holding right mouse button -> select all

o   The right click again-> Paste the Arduino sketch fro MRL

o   Save as MRLCOM

o   Now press the check mark to verify the code

o   If you’ve passed verify step press Upload arrow to upload MRL sketch to Arduino

 

·      Go back to MyRobotLab and click on python and start script

o   In the InMoovHand example my script is named myrobot\untitled.1.py

o   Press execute ( right side of red stopsign)

·      For InMoovHand example:

o   Click on the hand.arduino.serial tab

o   Select correct com port and press start

o   Go to the hand.thumb tab

§  Check correct pin

§  Attach to hand.arduino

§  You should be able to move servo via the slider bar. Also you will be able to see commands sent to Arduino via the open cmd window.

Hope this is useful for someone else.

Blaine