1 / 18

Robotics

In this lab work, you will create and show your program for a robot that uses a light sensor to follow a line. Learn how to calibrate the sensor and explore reverse engineering. Homework assignments and postings included.

Download Presentation

Robotics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Robotics Light sensor. Calibration. Reverse engineering challenge. Lab work: Create and show your program. Add light sensor (different orientations). Robot moves with light. Robot follows line. Homework: Postings.

  2. Light sensor • Detects ambient (surrounding) light • Calibration establishes minimum and maximum values • Set block at specified level and comparison (greater or less than) and sensor returns true if and only comparison is true. • Can be set to generate light and (therefore) measure the reflection.

  3. Light sensor blocks • Wait for light to be more (or less) than specified levelOR • Sense light (and keep going). • Data links inputs: • Port • Level • Less or more • Generate light or not • Data links outputs: • Intensity (scale 0 to 100) • Raw scale (0 to 1024)

  4. Calibration • There are default values, but it is HIGHLY RECOMMENDED that you set those values based on actual room conditions. • 2 ways • Connected to computer using Tools/Calibrate Sensors • Create calibration code/phase in program • Gives chance to place robot (light sensor) on minimum • Gives chance to place robot (light sensor) on maximum

  5. Calibration procedure using computer • Connect NXT to computer • Tools/Calibrate Sensors downloads a program • On NXT, follow instructions • Place with sensor on minimum value, press Enter • Place with sensor on maximum value, press Enter

  6. Tools menu

  7. Calibration block on NXT • Download program with calibration block. • NOTE: requires use of touch sensor • Aside: need to ‘mesh’ your reading of program with assumptions on actions.

  8. Wait for left button on NXT Calibrate minimum value position robot position robot

  9. Use calibrated value and enter key Need to abort program using button

  10. Use raw value (0 to 1024) and time

  11. Reverse engineering test • Shine beam of light • Place robot (with light sensor) • Program: intensity going to power. Motors are turning…

  12. What does the robot do? • Guess • Try it!

  13. Lab • Your program involving sound and bump/touch sensor.

  14. Lab exercises • Add light sensor to basic robot • Write, download and test calibration program • Write, download and test “sense and display” program (two variations shown) • calibrated scaled value versus raw value. • button versus time • Follow line • Note: program for this given in Mindstorms program

  15. Homework • Postings • Examine links on AI • [Start] thinking about your library research project.

More Related