Answers.Body: <p>I had to add an unlimited block</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-07T17:23:05.390Z
Answers.LastActivityDate: 2021-02-07T17:23:05.390Z
Answers.UserDisplayName: what
Body: <p>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 <code>L</code> and then turns to the right 30 degrees and saves the value as <code>R</code>. Then it compares both values and if <code>R</code> is more than <code>L</code> 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.
  <a href="https://github.com/Talhoid/Talhoid.github.io/raw/main/TestTest.rbt" rel="nofollow noreferrer">TestTest.rbt</a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-05T00:38:53.917Z
Comments.Text: Can you share a screenshot of the program?
Comments.UserDisplayName: David Lechner
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-07T17:15:02.997Z
Comments.Text: @DavidLechner Yeah I will.
Comments.UserDisplayName: what
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-07T17:21:27.577Z
Comments.Text: @DavidLechner nvm i got it fixed i didn't have an unlimited block at the start and the loop just made it stop
Comments.UserDisplayName: what
Tags: <nxt><programming><motor><nxt-g>
Title: Program just stops motors and won't move
UserDisplayName: what
ThreadText: # Program just stops motors and won't move
  
  (Asked by: username_0 on 2021-02-05)
  
  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 username_0 I've tried.
  [TestTest.rbt](https://github.com/Talhoid/Talhoid.github.io/raw/main/TestTest.rbt)
  
  **Tags:** nxt, programming, motor, nxt-g
  
  > **Comments:**
  > **username_1**: Can you share a screenshot of the program?  
  > **username_0**: @username_1 Yeah I will.  
  > **username_0**: @username_1 nvm i got it fixed i didn't have an unlimited block at the start and the loop just made it stop  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-02-07. Score: 1 | Accepted answer
  
  I had to add an unlimited block
  
  
  ---
  
  