i am having trouble getting a loop until to stop
sharon anthony
Posts: 17
i have to make robot go 4 feet make right 90 degreee turn 7 times i used a counter vairable and a rep variable at the end but when i designate reps= reps + 1
the loop until (reps >=7) keeps saying i need a "TO" after the reps + 1. can you use the for next loop and at end just a do loop with the loop until?
sharon
the loop until (reps >=7) keeps saying i need a "TO" after the reps + 1. can you use the for next loop and at end just a do loop with the loop until?
sharon
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
thank u so much
sharon
2) Why not use a FOR loop like "FOR reps = 1 to 10" instead of the outer DO loop with "NEXT" instead of the "LOOP UNTIL"? It's much clearer.
3) Your "reps = reps + 1" is outside of the DO / LOOP so "reps" never gets incremented beyond 1.
4) Servos are not exact things so 750 (1500us) is not always the stop point for a continuous motion servo and 850 (1700us) and 650 (1300us) are not always symmetric speeds around the stop point. It helps if you calibrate the servo (as described in the "Robotics with the BoeBot" manual).