Help with BS2 coding
ElectriKC
Posts: 13
I am doing a project for school and it consists of a ir roaming robot with an arm that is supposed to be raised by a servo. The problem is that I am new to programming and I do not know how to get the servo to move ONLY 90 degrees. It is a 360 degree servo, so I cannot get it to stop rotating when I want the desired angle. I sent the attachment to the code, but I am unsure if it actually uploaded or not. If not, the last portion of my code(the one I am working on for the arm) is destroy_target: ' Fire routine.
FOR pulse_count = 0 TO 0
PULSOUT 12, 750
PULSOUT 13, 750
PULSOUT 14, 500
PAUSE 20
NEXT
GOTO main 12 and 13 are the wheel servos and 14 is for the arm..750 is to make the servo stop(not move in any direction)..Thank You for your help!!
FOR pulse_count = 0 TO 0
PULSOUT 12, 750
PULSOUT 13, 750
PULSOUT 14, 500
PAUSE 20
NEXT
GOTO main 12 and 13 are the wheel servos and 14 is for the arm..750 is to make the servo stop(not move in any direction)..Thank You for your help!!
Comments
Edit: Actually. I would use two pushbottons. One for CW and one for CCW.