Pololu micro dual serial motor controller
vla7
Posts: 79
Can anyone give some insight into using the the micro dual serial motor controller from Pololu?
The example lego program for the obstacle avoiding robot uses this motor controller and gives the following numbers for controlling 2 motors.· The numbers correspond to the motor number and direction.
left forward···· 0
left back········ 1
right forward··· 2
right back······· 3
When I use the serout command (Serout 6,84,[noparse][[/noparse]$80,0,0,127]) I keep getting both motors spinning instead of only one.
Here's the program I used wanting to get one motor to spin for one second and then stop.
' {$STAMP BS2}
HIGH 6
LOW 5
HIGH 5
PAUSE 100
SEROUT 6,84,[noparse][[/noparse]$80,0,0,127]
PAUSE 1000
SEROUT 6,84, [noparse][[/noparse]$80,0,0,0]
END
Can anyone tell me why both motors are spinning with this command?
·
The example lego program for the obstacle avoiding robot uses this motor controller and gives the following numbers for controlling 2 motors.· The numbers correspond to the motor number and direction.
left forward···· 0
left back········ 1
right forward··· 2
right back······· 3
When I use the serout command (Serout 6,84,[noparse][[/noparse]$80,0,0,127]) I keep getting both motors spinning instead of only one.
Here's the program I used wanting to get one motor to spin for one second and then stop.
' {$STAMP BS2}
HIGH 6
LOW 5
HIGH 5
PAUSE 100
SEROUT 6,84,[noparse][[/noparse]$80,0,0,127]
PAUSE 1000
SEROUT 6,84, [noparse][[/noparse]$80,0,0,0]
END
Can anyone tell me why both motors are spinning with this command?
·
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
' {$STAMP BS2}
HIGH 6 '<--- you may want to remove this as the SEROUT command will automatically make this pin an output when you execute it a few lines from now.
LOW 5
PAUSE 10 '<--- add a pause for 10 ms here to allow the unit to reset before bringing it high again.
HIGH 5
PAUSE 100
SEROUT 6,84,[noparse][[/noparse]$80,0,0,127]
PAUSE 1000
SEROUT 6,84, [noparse][[/noparse]$80,0,0,0]
END
Have you loaded the test program that Pololu provides in the manual?· Does that work as expected?