RobotC Lecture 3

RobotC Lecture 3 - Optical Sensors Uses a detector that...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Optical Sensors • Uses a detector that outputs a voltage proportional to the light intensity (input) • Light detected can be: – Ambient – From a white light source – From a coloured light source (red, green, blue)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Optical Sensors
Background image of page 2
Grayscale Intensity Bright White High intensity 100% Black Low intensity 0%
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Colour Sensing High Low Red Can be used to identify colours or ombined to Blue Green combined to give an overall intensity 100% 0%
Background image of page 4
Lego Robot Colour Sensor • 3 LEDs (red, blue, green) to produce source light • Raw measurements give intensity processed to give 6 colours x. SensorType[S1] = sensorCOLORFULL; int colour = SensorValue[S1]; Ex. Configure sensor (all LEDs on) Store a number indicating colour
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lego Robot Colour Sensor Other Modes: sensorCOLORRED, sensorCOLORBLUE, sensorCOLORGREEN Only lights up one LED: For Ambient light (no LEDs): sensorCOLORNONE SensorRaw[S1] Contains intensity value 0 to 255 Intensity:
Background image of page 6
Colour Sensor Example • Let’s write a program that spins in an expanding spiral until it sees red
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 24

RobotC Lecture 3 - Optical Sensors Uses a detector that...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online