I’m having a lot of trouble getting my serial motor controller to work with my basic atom module. Its a pololu micro dual motor controller that uses a serial interface. It works great with my BS2 but for some reason it wont work with my atom. I tested and check all the pins, tried different baud rates, and so on and nothing. I 99% sure its something wrong with the code. I’m thinking that the baud rate might be wrong perhaps because I wanted a non-inverted bit with no parity at a 9600 baud so the manual says it should be “N9600”. Except if I put any number in front of the 9600 it gives me an error. I attached a short piece of code I am using just to test it out. Please let me know if anything looks wrong.
speed VAR Byte
PAUSE 200
SEROUT 15, 9600, $80, 2,2] 'sets controller in two motor mode
LOW 14 'reset motor controller
PAUSE 100
HIGH 14
PAUSE 100 'motor controller startup time
FOR speed = 0 TO 127 'motors speed up
SEROUT 15, 9600, $80, 0, 5, speed]
SEROUT 15, 9600, $80, 0, 7, speed]
PAUSE 40
NEXT
FOR speed = 127 TO 0
SEROUT 15, 9600, $80, 0, 5, speed] 'motors slow down
SEROUT 15, 9600, $80, 0, 7, speed]
PAUSE 40
NEXT
FOR speed = 0 TO 127
SEROUT 15, 9600, $80, 0, 4, speed] 'motors reverse, speed up
SEROUT 15, 9600, $80, 0, 6, speed]
PAUSE 40
NEXT
FOR speed = 127 TO 0
SEROUT 15, 84, $80, 0, 4, speed] 'motors slow down, in reverse
SEROUT 15, 84, $80, 0, 6, speed]
PAUSE 40
NEXT
END