Trying to work with a Polu Serial motor controller
charleyshf
Posts: 165
Hello,
I am fairly new to the Propeller and have been trying to get my prop to talk with a Polu Serial motor controller, I found an example for the basic stamp 2:
serout pin,baud,[noparse][[/noparse]$80,0,0,speed]
I have tried using simple_serial.spin as well as FullDuplexSerial.spin without any success.
With simple_serial·I tried :
dira[noparse][[/noparse]4] := 1· 'Set pin4 to output
outa[noparse][[/noparse]4] := 1 'Set pin4 to high(enables motor controller)
a·delay
SERIAL.init(-1,3,9600)
a delay
SERIAL.str(string($80,0,0,127))
The module I am trying to work with is this: http://www.pololu.com/file/download/smc02b_guide.pdf?file_id=0J36
I can get this working with my BS2, but for some reason I cannot get it to do anything with my prop.
I'd appreciate any ideas.
I am fairly new to the Propeller and have been trying to get my prop to talk with a Polu Serial motor controller, I found an example for the basic stamp 2:
serout pin,baud,[noparse][[/noparse]$80,0,0,speed]
I have tried using simple_serial.spin as well as FullDuplexSerial.spin without any success.
With simple_serial·I tried :
dira[noparse][[/noparse]4] := 1· 'Set pin4 to output
outa[noparse][[/noparse]4] := 1 'Set pin4 to high(enables motor controller)
a·delay
SERIAL.init(-1,3,9600)
a delay
SERIAL.str(string($80,0,0,127))
The module I am trying to work with is this: http://www.pololu.com/file/download/smc02b_guide.pdf?file_id=0J36
I can get this working with my BS2, but for some reason I cannot get it to do anything with my prop.
I'd appreciate any ideas.
Comments
Thank you again for your help.
··
I know nothing about assembly.
Something I was thinking about, when using this motor controller with the basic stamp, or even a pic, it's just slow in general, so even if I could get a robot that avoids objects using sonar, with this motor controller I would need to set the distance way up there, or maybe I just have a bad motor controller unit.
Anyways I think it's going to be easier for me to either get a different motor controller that is controlled with either PWM or even like the HB-25's, at least with modified servos for wheels I am not having issues like this, I spent the entire weekend trying to figure out what the hec I am doing wrong, and I am still at a loss.
·