Servo Controller Code Not Working

I’m glad to hear you were able to track down your initial problem and get your servos moving. The red LED you are seeing now is an indication of a fatal error, such as might be caused by invalid serial input, so you either are occasionally sending bad commands to the controller, or electrical noise is occasionally corrupting your commands.

The controller does not support positions above 254 in MiniSSC mode and above 255 in 8-bit Pololu mode, so trying to send a position value of 256 could cause the problems you are seeing (assuming you are sending it as two bytes).

I suggest you remove the pot from the system and instead send specific, known positions to the controller to see how repeatable the problem is. If it happens randomly, you can attribute it to noise and look into taking steps to reduce electrical interference. If it always happens when you send a particular position command, then you know you have a software problem.

- Ben