Hey guys, long time no see.
I have come to ask for some assitance in writing code for a robot that i have made for a Competition that being held at BU. As of right now i am using the Bot Board Along with the Basic Atom 28. I have been staring at the manual and existing code as well as playing with the Basic Atom Software all day, but alas, I have no luck.
Currently the robots has 2 servos, and 2 buttons that I need input from, but i can’t seem to attain. Basically I need one servo to go to a certain position upon start up (I tried doing my own program for this cause I thought it was straight forward, but I couldn’t get it to work) Then have the micro tell the Sabertooth 2 x 10 to run a motor until a switch is pushed. Then I need another servo to go to another position. After that i need the robot to reverse the motor direction and keep moving until a second switch is pushed which at that time i want it to stop.
[code]
Bumper (Constant Definition)
Switch (Constant Definition)
main
servo P4, 900
if Bumper = 0
PWM Motor 1
elseif Bumper = 1
gosub Catapault
endif
goto main
endmain
Catapault
servo P5, 1000
if switch = 0
PWM Motor 1 (Reverse Direction)
elseif switch = 1
PWM Motor 1 (Stop Motion)
end catapault[/code]
Thats the basic outline of what needs to be done. If anyone could help I’d be incrdibly greatful considering this 'bot has to be up and running by sunday
Well, any help is appreciated
-Jared