Introduction
The most fun you can have (after blinking LEDs) is using sensors to detect whats going on in the world and act on that information. However, all sensors have their own methods of interfacing. That can make them a real pain to work with: some need pull-up resistors, some need certain power supplies, some use lots of power, some don't. Since there aren't that many different sensors that people tend to want to use I have collected the most common sensors with code examples and wiring diagrams.
Sensors!
- Force sensitive resistor - Used to detect physical pressure such as pinching, squeezing, pushing, brushing
- Photocells - Used to detect light/dark, breakbeams, simple object detection
- Temperature - Used to determine environmental temperature
- Tilt sensors - Used to detect motion/vibration and orientation.
- PIR sensors - Used to detect motion activity such as animals or people