I'm trying to make a program in the NXT software that turns on the motors unlimited, then waits until something is less than 30 cm, stops the motors, turns to the left 30 degrees and saves the value of the ultrasonic sensor as L
and then turns to the right 30 degrees and saves the value as R
. Then it compares both values and if R
is more than L
then it goes forward indefinitely otherwise it turns 30 degrees to the left and then continues.
I can't seem to make a program that does that. Every time I test my program it just stops the motors and moves when I put my hand in front of it and then it just stops again. This is what I've tried.
TestTest.rbt
-
5Can you share a screenshot of the program?– David LechnerCommented Feb 5, 2021 at 0:38
-
@DavidLechner Yeah I will.– whatCommented Feb 7, 2021 at 17:15
-
@DavidLechner nvm i got it fixed i didn't have an unlimited block at the start and the loop just made it stop– whatCommented Feb 7, 2021 at 17:21
Add a comment
|