Home ] Up ] #1 ] #2 ] #3 ] #4 ] [ #5 ] #7 ] #8 ]
#5

Up ] Version 1 ] Version 2 ] Version 3 ]


Ultrasonic Radar

 

 Topics: Motor movement and Ultrasonic sensor

Last updated: 21-10-12

bullet

Find inspiration to the construction here or try your own design

 
 
 Exercises / Problems:

Create a program which:

  1.  Turns the US (Ultrasonic Sensor) 180 deg. First Clockwise and then back again.

  2. Keep track of the objects in front - seen by the distance from US

  3. Update the display with the actual data (distance to objects)

 
bullet

Radar_Start_Help
bullet

Get it here as a text-document    MMMI/NXT/Lec05/Radar_Start_help.txt

  . .
 




  Run the program and watch the screen - Try to understand and describe whats going on:

How does the RotateMotor influence the movement of the motor?
Try to change the SPEED value - Remember to download the program as well

Whats the meaning of the two LineOut - function calls?

What does the value 255 from the US sensor mean?

How many task does this program of and why not only one task?
     
 
bullet

Version 1 of the US Radar:

. .
Use the Position information in combination with the Distance from the US sensor to put Circles at the Screen.
The data structure Radar could be useful to store the result of the scan.
(Please not that one scan consist of a Clockwise and a Counter Clockwise turn)

The circle at the top of the screen shows that theres an object at 128 cm distance from the sensor.
The others mostly at the distance 40 cm.

Extra excersise - show some dotted guide lines at the screen for each 20 cm distance.
   
 
bullet

Version 2 of the US Radar:

. .
In order to keep track of changes at the screen image would it be nice to remember to former scan and present it as circles without filling.

Hint! Define an extra array called Former which could be loaded with the data fra Radar each time a new scan starts.
   
 
bullet

Version 3 of the US Radar:

   
Create a screen image which shows a halfcircle instead (more like a real radar image)
The dotted arc could be 100 cm.