Presentation is loading. Please wait.

Presentation is loading. Please wait.

Robotics Light sensor. Calibration. Reverse engineering challenge. Lab work: Create and show your program. Add light sensor (different orientations). Robot.

Similar presentations


Presentation on theme: "Robotics Light sensor. Calibration. Reverse engineering challenge. Lab work: Create and show your program. Add light sensor (different orientations). Robot."— 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 level OR 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

5

6 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

7 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

8 Tools menu

9 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.

10 Wait for left button on NXT Calibrate minimum value position robot

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

12 Use raw value (0 to 1024) and time

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

14

15 What does the robot do? Guess Try it!

16 Lab Your program involving sound and bump/touch sensor.

17 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

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


Download ppt "Robotics Light sensor. Calibration. Reverse engineering challenge. Lab work: Create and show your program. Add light sensor (different orientations). Robot."

Similar presentations


Ads by Google