I'm using a pololu servo controller via Serial - I have pin #1 (tx) on the arduino connected to "logic-level serial input" pin #3 on the pololu. Power and gnd is wired okay, I'm using 3 servos - it all works.
Sort of.
If I power up the arduino, and connect a terminal (can see the text equivalent of the commands sent to the pololu) everything works great. I can then quit the terminal app, unplug the usb cable, and the servos continue to work fine.
But if I don't hook up the terminal app, it doesn't work. In other words, if I just power up the board with no usb or terminal app, the servos don't move - there is something that the polulo doesn't like (?). As soon as a terminal app is connected, the servos start turning (and the app can be killed and usb unplugged).
I can't figure out what the heck is going on.
Can anyone shed any light? Seems that the act of connecting the terminal somehow "makes it work".
Sounds more like the Arduino is not properly initializing serial communication with the controller. Post a link to the controller (and data sheet) and your code.
buff[0] = 0x80; //start byte
buff[1] = 0x01; //device id
buff[2] = 0x04; //command number
buff[3] = servo; //servo number
buff[4] = pos_hi; //data1
buff[5] = pos_low; //data2
for(int i = 0; i < 6; i++) Serial.print(buff*, BYTE);* } And so a call to servoSet sets the position of the servo. As stated, all works fine as long as a terminal connection has been connected briefly. There is a possibly similar thread here, but it doesn't address my issue: http://forum.pololu.com/viewtopic.php?t=745
ARG. Arg arg arg - I apologize - I am an idiot - I went down a rabbit hole - still have the issue, but it's not related to the pololu - this is a red herring.
The way I am sending messages to the arduino is via the ethernet shield - have a little http server. If I connect the terminal app, then everything works, if I don't connect the terminal app via serial, then nothing.
So, something to do with how Serial and Ethernet are behaving - I am still stumped, but know a bit more.