Skip to main content

I'm trying to make a program in the NXT software that turns on the motors indefinitelyunlimited, 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 6030 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 6030 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

I'm trying to make a program in the NXT software that turns on the motors indefinitely, 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 60 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 60 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

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

Source Link
what
  • 11
  • 4

Program just stops motors and won't move

I'm trying to make a program in the NXT software that turns on the motors indefinitely, 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 60 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 60 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