motor control pwm + code
tehmoordar
Posts: 52
Hi,
I have connected my motors on the robot-- now I want to run them simultaneously--like asking my robot to turn right or left and go forward.
I·have configured motor controll to 2 motor mode by my following command
' {$STAMP BS2}
' {$PBASIC 2.5}
SEROUT 2, 84, [noparse][[/noparse]$80,2,2]
Then In my following code these motors should run simultaneously but these are not runing (only one responds) what is wrong with my following code
' {$STAMP BS2}
' {$PBASIC 2.5}
speed VAR Byte
HIGH 2
LOW 3
HIGH 3
PAUSE 100
FOR speed = 0 TO 127
SEROUT 2,84,[noparse][[/noparse]$80,0,1,speed]
PAUSE 20
NEXT
FOR speed = 127 TO 0
SEROUT 2,84,[noparse][[/noparse]$80,0,1,speed]
PAUSE 20
NEXT
what am I doing wrong above
Thankyou
I have connected my motors on the robot-- now I want to run them simultaneously--like asking my robot to turn right or left and go forward.
I·have configured motor controll to 2 motor mode by my following command
' {$STAMP BS2}
' {$PBASIC 2.5}
SEROUT 2, 84, [noparse][[/noparse]$80,2,2]
Then In my following code these motors should run simultaneously but these are not runing (only one responds) what is wrong with my following code
' {$STAMP BS2}
' {$PBASIC 2.5}
speed VAR Byte
HIGH 2
LOW 3
HIGH 3
PAUSE 100
FOR speed = 0 TO 127
SEROUT 2,84,[noparse][[/noparse]$80,0,1,speed]
PAUSE 20
NEXT
FOR speed = 127 TO 0
SEROUT 2,84,[noparse][[/noparse]$80,0,1,speed]
PAUSE 20
NEXT
what am I doing wrong above
Thankyou
Comments
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
www.parallax.com
Post Edited (Dave Andreae (Parallax)) : 3/22/2005 4:51:50 PM GMT
even if I make it only high --it does not run both my motors-- to run both my motors togather what should I do?
like my serout command "SEROUT 2,84,[noparse][[/noparse]$80,0,1,speed] "
do I need to change some thing
Thankyou
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I am using Pololu micro dual serial motor controller--
Thankyou
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
second I have to give serout command seprately for both motors.
Thankyou
after reading above-- can you give me idea--as how to use themal heat sink on such a little chip
Thankyou