I recently got the Lego Mindstorms EV3 kit. I wanted to make a self driving car, but I got stuck on the building part. I saw another question like this, however it was for NXT and had no decent answers. I need to make a rotating disk on top of the robot for the Ultrasonic sensor; otherwise I would need 2 more sensors to avoid hitting walls. Remember that it needs to fit on top of a moving robot, not be a stationary stand! I got the self driving car to work, but because the sensor was not rotating, it could only see in front of it. I do not know if this is possible with the EV3 kit, but if you know how, please let me know! Anyways, thanks for reading this! :D

  • This question is a bit too broad to be able to provide a good answer. More specific questions like "I built a car, but obstacle avoidance isn't working. This is how it is supposed to work... Here is a picture of my car and here is my program." Aug 11, 2018 at 14:37
  • Here is a car to provide some inspiration: youtube.com/watch?v=kAvduVtT748 Aug 11, 2018 at 14:37
  • Seen it done before in Sumo bots, the distance sensor rotating from left to right as a sort of radar dish... Programming can get quite complicated then I can imagine... Aug 13, 2018 at 20:23

2 Answers 2


I don't have a Lego EV3, but I have created a self-driving car with my NXT brick. I found the instructions from nxtprograms.com, but they are for the NXT. (I'm sure that you can adapt them for the EV3 though). The program is also for the NXT, but nxtprograms provides enough comment blocks that I think you should easily be able to build your own program with the EV3 software.

Here are the instructions: http://nxtprograms.com/NXT2/explorer/index.html


I built mine with an IR sensor on the left, an ultrasonic sensor on the right and some touch sensors in the front and back. It worked really well to get through a track made of wooden blocks and around the room.

  • Can't you share a program instead of just showing off your robot? May 18, 2020 at 20:51
  • 2
    No-I wouldn't for a couple of reasons: First, I didn't show off my robot-I answered the original question at the top of the post- someone was trying to build a mech to rotate an ultrasonic sensor. I offered another way to do it. Second, it would be unhelpful for me to share my program. A program is specific to the build and you plugging in my program to your build would not work. Lastly, why be rude? I was trying to help. I understand how frustrating building these can be when you get stuck but being insulting isn't going to get you any further. Try asking specific questions if you need help.
    – Nile
    May 20, 2020 at 13:19

Your Answer

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

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