Connecting the servo controller to the Galileo

You've checked the servo motor controller and the servos; you'll now connect the motor controller up to the Galileo and make sure you can control the servos from it.

Let's now talk to the motor controller. Here are the steps:

  1. Connect Galileo to the motor controller by connecting a mini USB-to-mini USB cable. Connect the cable to the USB host connection on the Galileo, like this:
    Connecting the servo controller to the Galileo
  2. Download the Linux code from Pololu at www.pololu.com/docs/0J40/3.b. Perhaps the best way is to log onto your Galileo, then type wget http://www.pololu.com/file/download/maestro-linux-100507.tar.gz?file_id=0J315.
  3. Then, move the file using this command:
     mv maestro-linux-100507.tar.gz?file_id=0J315 maestro-linux-100507.tar.gz
    
  4. Unpack the file by typing tar –xzfv maestro_linux_011507.tar.gz. This will create a directory called maestro_linux. Go to that directory by typing cd maestro_linux and then type ls, you should see something like this:
    Connecting the servo controller to the Galileo

The document README.txt will give you explicit instructions on how to install the software. Unfortunately, you can't run MaestroControlCenter on your Galileo, your version of windows doesn't support the graphics, but you can control your servos using the UscCmd command line application. First type./UscCmd --list and you should see the following:

Connecting the servo controller to the Galileo

The unit sees your servo controller. If you just type mono ./UscCmd, you can see all the commands you can send to your controller:

Connecting the servo controller to the Galileo

Notice you can send a servo a specific target angle, although the target is not in angle values so it makes it a bit difficult to know where you are sending your servo. With a servo and battery connected to the servo controller, try typing ./UscCmd --servo 0, 10. The servo will move to its full angle position. Type ./UscCmd – servo 0, 0 and it will stop the servo from trying to move. In the next section, you'll write some python code that will translate your angles to the commands that the servo controller will want to see to move it to specific angle locations. If you are struggling with the USB connection, see http://www.linux-usb.org/FAQ.html for more information.

Note

If you didn't run the Windows version of Maestro Controller and set the Serial Settings to USB Chained, your motor controller might not respond. Rerun the Maestro Controller code and set the Serial Settings to USB Chained.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.113.208