Answers.Body: <p>You have the motor power set to 1 and you are waiting for 1 full rotation. If the motor moves at all, it will take a long time to complete one rotation. Most of the loop is spent waiting for the rotation to complete (or if the motor is not moving at all, then the loop never actually loops).</p>
  
  <p>Try using a higher power - at least 10. Also, use less than one rotation, or use time (just a fraction of a second) instead for the duration of the motor block.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-27T00:26:28.970Z
Answers.LastActivityDate: 2016-01-27T00:26:28.970Z
Answers.UserDisplayName: David Lechner
Body: <p>I have a loop but always inputs the same condition, please see the picture.</p>
  
  <p><a href="https://i.sstatic.net/Y4T2E.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Y4T2E.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-26T20:18:33.363Z
Comments.Text: Likely the output of your IR sensor is always meeting the same condition (either higher than 50 or lower than 50). Try doing this again but instead display the measured value on the screen instead of doing a motor action, and see what values you are reading.
Comments.UserDisplayName: Phil B.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-26T21:08:38.073Z
Comments.Text: Yes always print the same values on the screen. So what is the problem?
Comments.UserDisplayName: christian russo
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-27T00:14:54.830Z
Comments.Text: What values does the sensor show?
Comments.UserDisplayName: dfrevert
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-27T02:03:40.830Z
Comments.Text: What are you trying to accomplish with this program? What is the IR sensor measuring? What are you testing it with? As per @DavidLechner's answer, it will spend a lot of time inside the loop after the comparison block executing the actual turn, so any changes you are making should be long enough for the code to return back to the comparison block after completing the turn.
Comments.UserDisplayName: Phil B.
Tags: <ev3><ev3-g>
Title: Loop doesn't work, always inputs the same condition
UserDisplayName: christian russo
ThreadText: # Loop doesn't work, always inputs the same condition
  
  (Asked by: username_0 on 2016-01-26)
  
  I have a loop but always inputs the same condition, please see the picture.
  
  [![enter image description here](https://i.sstatic.net/Y4T2E.png)](https://i.sstatic.net/Y4T2E.png)
  
  **Tags:** ev3, ev3-g
  > **Comments:**
  > **username_1**: Likely the output of your IR sensor is always meeting the same condition (either higher than 50 or lower than 50). Try doing this again but instead display the measured value on the screen instead of doing a motor action, and see what values you are reading.  
  > **username_0**: Yes always print the same values on the screen. So what is the problem?  
  > **username_2**: What values does the sensor show?  
  > **username_1**: What are you trying to accomplish with this program? What is the IR sensor measuring? What are you testing it with? As per @DavidLechner's answer, it will spend a lot of time inside the loop after the comparison block executing the actual turn, so any changes you are making should be long enough for the code to return back to the comparison block after completing the turn.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2016-01-27. Score: 2
  
  You have the motor power set to 1 and you are waiting for 1 full rotation. If the motor moves at all, it will take a long time to complete one rotation. Most of the loop is spent waiting for the rotation to complete (or if the motor is not moving at all, then the loop never actually loops).
  
  Try using a higher power - at least 10. Also, use less than one rotation, or use time (just a fraction of a second) instead for the duration of the motor block.
  
  
  ---
  
  