I have a loop but always inputs the same condition, please see the picture.
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.– Phil B.Jan 26, 2016 at 20:18
Yes always print the same values on the screen. So what is the problem?– christian russoJan 26, 2016 at 21:08
What values does the sensor show?– dfrevertJan 27, 2016 at 0:14
1What 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.– Phil B.Jan 27, 2016 at 2:03
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.