Need Help with BS2 connected to a motor controller
Hi. I have a bs2 in a board of education. I want to program my RC car's Brush motor to run. I have a motor controller by NOVAK. It is the XRS sport reversible motor controller. I am not sure how to program the motor speed controller with the basic stamp 2. I can control the steering servo motor no problem however. Can someone help me? I added pics so you can get an idea. Thanks
Comments
' {$STAMP BS2}
' {$PBASIC 2.5}
speed VAR Byte
HIGH 14
LOW 15
HIGH 15
PAUSE 100
FOR speed = 0 TO 127
SEROUT 14,84,[noparse][[/noparse]$80,0,0,speed]
PAUSE 20
NEXT
FOR speed = 127 TO 0
SEROUT 14,84,[noparse][[/noparse]$80,0,0,speed]
PAUSE 20
NEXT
FOR speed = 0 TO 127
SEROUT 14,84,[noparse][[/noparse]$80,0,1,speed]
PAUSE 20
NEXT
FOR speed = 127 TO 0
SEROUT 14,84,[noparse][[/noparse]$80,0,1,speed]
PAUSE 20
NEXT
Good analysis of the problem. You can mimic those pulses with the PULSIN and PULSOUT commands.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Involvement and committment can be best understood by looking at a plate of ham and eggs. The chicken was involved, but the pig was committed. ANON
Post Edited (Bruce Bates) : 8/6/2008 10:06:52 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen