3

I'm developing a small program with the LEGO's Ev3 development tool. I'm trying to make the robot rotate, 30° at time, and if the infrared sensor detects something then make something and stop. Here is my current program:

enter image description here

The result is odd: it makes a few loops, than I can see the sensor turns off for a few seconds and then it is completely unresponsive, even if I stop the program and run other programs! I have to turn it off and on again to make it work.

The sensor is on port 4, and it works with programs developed on the ev3 itself.

3
  • 3
    How can you "see" that the sensor turns off? Perhaps you have it mistaken for the Ultrasonic Sensor. They are similar shape, but the ultrasonic sensors has LEDs so you can "see" if it working. The Infrared sensors does not have LEDs, just red paint, so you cannot "see" if it is working. Jan 20, 2016 at 22:30
  • 1
    You are right, I was using ultrasonic sensor! Thank you! Jan 20, 2016 at 22:38
  • @DavidLechner Please consider posting your comment as an answer.
    – Ambo100
    Dec 29, 2016 at 12:36

1 Answer 1

2

Try waiting longer - one second or one and a half. And you were using the ultrasonic sensor but in the program you use infrared sensor block.

You can switch to port view prior to running your program to verify that your sensor is of the expected type and works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.