need help making program.
Nachos!!
Posts: 3
I need some help getting a program to run on my boe-bot. It needs to go strait 4ft then make a 90 degree right turn and repeat this 7 times. Then it has to make a 45 degree right turn and move forward 2ft. When it comes to a stop it has to play a song. I have gotten it to do the 7 turns and I have written the song. I just cant figure out how to make it do the 45 degree turn, move up 2ft, and then put it all together to make it work correctly. Any help is greatly appreciated. Thanks!
Comments
' {$PBASIC 2.5}
' Drew Prothro
Counter VAR Word
Turns VAR Word
Turns = 1
DO
FOR counter = 1 TO 275 ' Boe-Bot moves forward 4 feet.
PULSOUT 13, 850
PULSOUT 12, 665
PAUSE 20
NEXT
FOR counter = 1 TO 18 ' Boe bot makes 90 degree right turn.
PULSOUT 13, 850
PULSOUT 12, 850
PAUSE 20
NEXT
Turns = (Turns + 1)
LOOP WHILE (Turns <=7)
END
I tried adding the 45 degree turn and two feet forward but it wouldnt do it. Not sure what I need to do with it. Thanks again!
' {$PBASIC 2.5}
' Drew Prothro
Counter VAR Word
Turns VAR Word
Turns = 1
DO
FOR counter = 1 TO 275 ' Boe-Bot moves forward 4 feet.
PULSOUT 13, 850
PULSOUT 12, 665
PAUSE 20
NEXT
FOR counter = 1 TO 18 ' Boe bot makes 90 degree right turn.
PULSOUT 13, 850
PULSOUT 12, 850
PAUSE 20
NEXT
Turns = (Turns + 1)
LOOP WHILE (Turns <=7)
FOR counter = 1 TO 9' Boe bot makes 45 degree right turn.
PULSOUT 13, 850
PULSOUT 12, 850
PAUSE 20
NEXT
FOR counter = 1 TO 138 ' Boe-Bot moves forward 2 feet.
PULSOUT 13, 850
PULSOUT 12, 665
PAUSE 20
NEXT
'insert song here
END