Download Ultrasonic Sensor Ev3 Macbook Pro



Download and install the new pre-release programming software for LEGO MINDSTORMS EV3 to your Apple Computer with macOS 10.14 Mojave or above. This pre-release has limited functionality, but you can install and connect to your programmable brick and download programs to your five Hero robots. Measure the distance between the EV3 Ultrasonic Sensor and the nearest object in front of the sensor. The sensor can detect objects from approximately 5 to 255 centimeters away. When the nearest object is beyond the maximum range of the Ultrasonic Sensor, the sensor outputs the maximum value, 255. The measured distances are approximate.

This will allow you to use the Lego MindStorms EV3 Ultrasonic Sensor with the EV3 Home Edition Set.This is the EV3 Ultrasonic SensorThis is included in the EV3 Education Kit, but not the EV3 Home Kit.You can purchase the EV3 Ultrasonic sensor separately, but there is still a problem you must overcome...Let us look at the problem.
  1. I have to solve a problem with EV3, using language C with ROBOTC. I am trying to find a ball in the field, grab it and drop in the triangle area. I'm using a ultrasonic sensor in front of the robot.
  2. Procedure: An EV3 Ultrasonic sensor was attached to a LEGO-made stick, and a cable connected the Ultrasonic to an input port on the EV3 Brick. A reading was taken using Port View, on the EV3 Brick, of a wall inside the tunnel. The EV3 Brick was programmed to have the Ultrasonic sensor respond to a specified distance from the wall with an action.
Start up Lego MindStorms EV3 Home Edition EditorLeft-click on 'File', Left-click on 'New Project'Left-click on the Yellow Rectangle to make sure it is raised, and...Look at the Sensors that can be used with this EV3 Home Edition editor...Brick Buttons, Color Sensor, Infrared Sensor, Motor Rotation, Timer, Touch Sensor, BUT...BUT no Ultrasonic Sensor!Let us left-click on the orange rectangle, and check the Loop options...Lots of options to end the Loop, BUT...BUT no Ultrasonic Sensor option!Let us close down MindStorms, and find out how to add Ultrasonic Sensors into our EV3 Home system.I will put a 'DeleteMe' folder on my desktop. Right-click on the desktop and choose the 'New' and 'Folder' options.To make sure I know where the download goes, I will put the download in this 'DeleteMe' folder.Start up your Browser, and type in:Type in the web address shown above.Demonstrating going to the download web page.Typing in the web address we previously showed youhttp://www.lego.com/en- us/mindstorms/downloads/EV3- blocks/ultrasonicUnder the heading 'Download EV3 Block' on the right of the screen you will see the 'DOWNLOAD' button.Click on 'NO'...Left-click on the DOWNLOAD buttonIf you are using Internet Explorer, left-click on the 'Save As' option, and find the 'DeleteMe' folder on the Desktop.Save the 'Ultrasonic.ev3b' file in to the 'DeleteMe' folder (or where-ever else you have chosen)SensorWait until the download is complete, then...Then close down the browser.Open the 'DeleteMe' folder to check the the 'Ultrasonic.ev3b' file has come down OK.Yes Ultrasonic.ev3b is there - good!Close 'DeleteMe' and start up Lego MindStorms EV3 Home version editor.Left-click on 'File' and left-click on 'New Project'Left-click on the 'Tools' menu, and left-click on the 'Block Import' optionThis will allow us to import the Ultrasonic Block into our EV3 Home version editor.MacbookA new window 'Block Import and Export' opens...Left-click on the 'Browse' button - we want to find the 'Ultrasonic.ev3b' file we have just downloaded.In my case I go to 'Desktop' and find the 'DeleteMe' folder - you go to where-ever you put your copy of 'Ultrasonic.ev3b'Left-click on 'Ultrasonic.ev3b' and left-click on the 'Open' buttonNow left-click on the blue 'Ultrasonic.ev3b' line, and left-click on the 'Import' button.We need to restart the EV3 editor so that the Ultrasonic.ev3b block can be added into our editor, left-click on the 'OK' button.Left-click on the 'Close' button.Close down the editor by left-clicking on the 'File' menu, and left-clicking on the 'Exit' option.Now start up the editor again to see if we have succeeded; left-click on the 'Lego MindStorms' image,Left-click on 'File' and left-click on the 'New Project' option.Left-click on the yellow rectangle to have a look at the Sensors that we can use...We have Brick Buttons, Color Sensor, Infrared Sensor, Motor Rotation, Timer, Touch Sensor - same as before, BUT...BUT now we have an Ultrasonic Sensor option as well!!! Marvellous! Our download worked!We can now use the Ultrasonic Sensors with our Lego MindStorms EV3 Home Edition set.But let us double check. Left-click on the orange rectangle,Left click on the Loop option, and drag it to the Command line.Left-click on the infinity sign (looks like a sideways 8) to see the loop ending options...We see lots of options, that now include an Ultrasonic menu option! This double check confirms our download has worked beautifully!So now all we have to do is to close down the editor,Left-click on 'File', left-click on the 'Exit' option, and left-click on the 'No' button.We are just about done - only cleaning up to do.Let us delete the 'DeleteMe' folder, so that the temporary download does not take up valuable space in our computer.Right-click on the 'DeleteMe' folder, and left- click on the 'Delete' menu option.Left-click on the 'Yes' optionOur desktop is now beautifully clean. I wonder how long it will stay that way?...

Follow an object using the LEGO Mindstorms Ultrasonic Sensor. Object moves away, the robot moves with the object. The program is very useful if you are doing STEM classes and you want to demonstrate results. People react very well to a robot following you like a dog for example.

  • #145
  • 15 Oct 2015
  • 5:43
  • LEGO MINDSTORMS
  • EV3, Ultrasonic Sensor, Basic, Programming
  • K.Mitov, I.Bozhilov, I.Gerginov

Previous video tutorials:

Follow an object with the Ultrasonic sensor

EV3-G program for following and object with the LEGO Mindstorms EV3 robots

English

The next program with our ultrasonic sensor is to make the robot follow my hand. Аs I move my hand away from the robot, I would like the robot to follow it and to keep at a distance of about 4 inches, like this.

Download, run the program.

Now I move my hand and the robot moves forward. The only thing that we should add to this program is that when I move my hand the robot should move at exactly the same distance, so it should keep 10 cm.

Macbook

Move, stop and move my hand and it continues moving. How can we make this process repeatable, moving and keeping distance of 10 cm? Since we want this whole process of moving forward, stopping and moving forward to repeat we need to use a loop.

What we want to repeat are the following blocks. First moving forward, waiting until we see an object, stopping and then waiting until the object moves away and when the object moves away we return to the beginning of the loop and we'll move the motor forward until we detect an object and when the object moves away we start again and move forward for undefined amount of time. This way we'll get our robot to follow the object in this case my hand. Let's see if the program works correctly.

Using The Ultrasonic Sensor Ev3

The robot moves forward, reaches my hand, I move my hand and the robot moves with the hand.

Download ultrasonic sensor ev3

What you can see is that we have this not very smooth movement of the motors. How can we improve this? What we want to change in our program is the Tank block with the stop option. We want to change it so it does not break when stopping but to coast, so it's stopping very slowly not immediately and this will probably make following the object a little smoother. Let's see if this works.

Ultrasonic Sensor Lego Ev3

I'll stop the program now. Let's run it again and what happens. We move with the robot forward until it sees my hand

Touch Sensor Ev3

but it does not stop.

Download Ultrasonic Sensor Ev3 Macbook Programmer

It moves it's smother but there is a glitch and the glitch happens if the sensor is very near to my hand. Now is following, it's very smooth but if my hand is very near to the sensor, like this, the robot won't stop.

So we have the program for following my hand but as we have the coast option it is possible if the object moves very slowly we actually touch the object and when we are touching the sensor is not able to detect any distance to the object and it's not working as expected. It might return a maximum distance or it might return 0 but if the object touches the sensor, the sensor is not returning correct values. As a result from this video we have a program for following an object that is moving.

In the next video we'll set few tasks that you can implement for the ultrasonic sensor so that you can learn more about it.

Courses and lessons with this Tutorial

Sensor

This Tutorial is used in the following courses and lessons

EV3 Basic Course. Introduction to robot programming, construction and sensor use

This course is designed for students, mentors and teachers that are completely new to LEGO Mindstorms EV3 robots and would like to start using them to learn, in classes or at competitions. It is quite different from previously built resources at FLLCasts because it makes no assumption on any previous knowledge and tries to introduce everything step-by-step.

Download Ultrasonic Sensor Ev3 Macbook Pro 2017

  • 38
  • 193:26
  • 30