To build electronic projects that can sense the physical world, you need to build circuits based around sensors: electronic components that react to physical phenomena by sending an electrical signal. Even with only basic electronic components, you can build useful and educational sensor projects.
But if you incorporate Arduino or Raspberry Pi into your project, you can build much more sophisticated projects that can react in interesting ways and even connect to the Internet. This book starts by teaching you the basic electronic circuits to read and react to a sensor. It then goes on to show how to use Arduino to develop sensor systems, and wraps up by teaching you how to build sensor projects with the Linux-powered Raspberry Pi.
Contents
Preface vii
1/Sensors 1
Project 1: Photoresistor to Measure Light 3
2/Basic Sensors 9
Project 2: A Simple Switch 9
Project 3: Buzzer Volume Control 12
Project 4: Hall Effect 14
Project 5: Firefly 17
3/Sensors and Arduino 33
Project 6: Momentary Push-Button and Pull-Up Resistors 34
Project 7: Infrared Proximity to Detect Objects 40
Project 8: Rotation (Pot) 43
Project 9: Photoresistor to Measure Light 47
Project 10: FlexiForce to Measure Pressure 49
Project 11: Measuring Temperature (LM35) 52
Project 12: Ultrasonic Distance Measuring (HC-SR04) 56
4/Sensors and the Raspberry Pi 63
Project 13: Momentary Push Button 64
Project 14: Blink an LED with Python 69
Project 15: Adjustable Infrared Switch 73
Project 16: Potentiometer to Measure Rotation 77
Project 17: Photoresistor 82
Project 18: FlexiForce 85
Project 19: Temperature Measurements (LM35) 86
Project 20: Ultrasonic Distance 89
A/Troubleshooting Tactics 95
B/Arduino IDE Setup 97
C/ Setting Up Raspberry Pi 101
D/Bill of Materials 117
Index 123