Connecting sensors to your Arduino board
In this recipe, we are going to build the project that we will use for the rest of this chapter. We basically want to connect sensors to the Arduino MKR1000 board that will continuously measure data. As an example here, we are going to connect a photocell (that we already used in the first chapter of this book), as well as a DHT11 temperature and humidity sensor.
Getting ready
Let's first see what additional components we will need for this project:
- Photocell (https://www.sparkfun.com/products/9088)
- 10K Ohm resistor (https://www.sparkfun.com/products/8374)
- DHT11 sensor (https://www.adafruit.com/products/386)
You will also need to install the Adafruit DHT library that you can find inside the Arduino board manager.
We are now going to assemble the project. First, place the resistor in series with the photocell on the breadboard, next to the MKR1000 board.
Now, connect the other end of the resistor to GND on the MKR1000 board, and the other end of the...