Need help with RC car forward and reverse issue
Hello,
I am new to parallax boards and I am working on a Board of Education USB rev B. I have connected it to a Dynamite Tazer 15T RC car controller in the 12 and 13 locations (X5). I have been using pulsout commands to figure out how to get the car to go forward, reverse,left ,right. My question is, when i try to go forward and then reverse in the same code, the reverse will not work. For example, i try to go forward and then pause for 5000 and then go reverse and the reverse will not work, but if i go reverse and then forward it works. If i try reverse and then forward and then reverse again, it will not work. I usually have to turn the board and the car off and then on again to get the car to go reverse again. I have LEDs plugged in for debug reasons, and they light up like they should. Here is the code:
The second "backwards" code runs, but the car wheels don't move. Is the issue my code? Or the car?
I am new to parallax boards and I am working on a Board of Education USB rev B. I have connected it to a Dynamite Tazer 15T RC car controller in the 12 and 13 locations (X5). I have been using pulsout commands to figure out how to get the car to go forward, reverse,left ,right. My question is, when i try to go forward and then reverse in the same code, the reverse will not work. For example, i try to go forward and then pause for 5000 and then go reverse and the reverse will not work, but if i go reverse and then forward it works. If i try reverse and then forward and then reverse again, it will not work. I usually have to turn the board and the car off and then on again to get the car to go reverse again. I have LEDs plugged in for debug reasons, and they light up like they should. Here is the code:
' {$STAMP BS2p} ' {$PBASIC 2.5} counter VAR Word DEBUG "backwards", CR FOR counter = 1 TO 15 PULSOUT 12, 4100 PAUSE 20 NEXT PAUSE 5000 DEBUG "Forward", CR FOR counter = 1 TO 15 PULSOUT 12, 1300 PAUSE 20 NEXT PAUSE 5000 DEBUG "backwards", CR FOR counter = 1 TO 15 PULSOUT 12, 4100 PAUSE 20 NEXT
The second "backwards" code runs, but the car wheels don't move. Is the issue my code? Or the car?
Comments