March 2017
Beginner
462 pages
9h 48m
English
This chapter looks at sensors that convert some physical measurement such as temperature, light, or physical movement into an analog or digital electronic signal.
Many different sensors are explained, and where appropriate, ways of using them with an Arduino or Raspberry Pi are included.
You want to be able to convert a mechanical movement to a digital on/off signal that you can use with an Arduino or Raspberry Pi.
Connect the switch between GND and a GPIO pin set to be a digital input as shown in Figure 12-1 and enable the GPIO pin’s internal pull-up resistor.
Your software will probably also need to “debounce” the signal from the switch.
Read now
Unlock full access