Serial Object & USB Servo Controller
I'm attempting to use the Serial object to use a USB Servo Controller with MMF2, but so far without any success.
The relevant instructions provided by the manufacturer are here:
http://www.pololu.com/docs/0J40/5.c
http://www.pololu.com/docs/0J40/5.e
I've tried both protocols, but I'm mainly interested in the simpler "Mini SSC protocol".
This is some simple code that I've tried:
+ Start of frame
-> Binary: Resize binary to 3 bytes
-> Serial: Open COM 7 with a baud rate of 9600 // I got COM7 from device manager
+ Serial: COM port is open
+ Only one action when event loops
-> Button: Enable // The button is disabled by default
+ Button clicked
-> Binary: Set byte 0 to 255 // 255 is the command byte for "SetTarget"
-> Binary: Set byte 1 to 5 // I want to set servo #5
-> Binary: Set byte 2 to 127 // 127 = return the servo to its centre
-> Serial: Send string$( "Binary object", 0, 3)
It opens the port alright, but nothing happens when I click the button (it should set servo #5 to its centre position).
I don't get any error messages from MMF2 or the Serial object.
If anyone has any suggestions or thoughts on what I might be doing wrong, I'd be most appreciative :)