External sensors we'll use in Lab 5:

Build up of $0.50 CdS Photoresistor
CdS (Cadmium Sulfide) Photo resistors
• Resistance varies indirectly with visible light intensity
• Very bright light: ~200 ohms
• Complete darkness: ~couple hundred kilo ohms
• Create senses output voltage divided across resistors
• Is relationship linear? Does it matter?

Sharp IR Distance Sensor, $9 - $15
Sharp IR Distance Sensors
• On-board circuitry provides analog values (0 - 5V) for different distances.
• Create senses output voltage varies indirectly with distance from source.
• We have two different sensors:
• • Model 2D120: 4 cm - 30 cm range
• • Model GP2D12: 10 cm to 80 cm range
• Is relationship linear? Does it matter?
• Explore and understand the technical information posted by Acroname!
What is the difference between digital and analog sensors or devices??
- Analog
- Have a "wide" range of output values (e.g., all the values from -200 to +200 on real number line)
- Examples: Thermometer, speedometer, wall clock
- Digital
- Have only finite values for the outputs, oftentimes only zero (low) or one high) values
- Examples: light switch, your grade for this term, digital clock
The new function to send information to the Cricket LED display is:
cr8_cricket_display(uint16 value-to-display, uint8_t value-is-signed, uint8_t display_in_hex);
value-to-display == the value you want to display.
value-is-signed == true if value is a signed number, false if value is an unsigned number.
display_in_hex == true if you want to display value in hexadecimal format, false if you want to use decimal format