Button activated LED and DHT11
Press the button, activate the led and the temperature and humidity sensor, see results in serial monitor.
What happens is that when the button is pressed, the led turns on the and the DHT11 grabs results and spits them out into the serial monitor.
This was rather an easy build in fact this if my first build.
1x Momentary Button
7x Jumper Wires
1x 220 ohm resistor
1x 10k resistor
Make sure you have both ground and 5v being supplied to the rails of your bread board.
- Place Led on the board and connect 220 ohm resistor on the negative end of led to ground and connect a wire from the positive end of the led to digital pin 13.
- Place down the momentary button on the board, we will only be using two of the four pins, out of the two pick one and wire it to positive on the board
- now place a wire in the other pin and make it go to digital pin 4, also place your 10k resistor in the same row as the wire for the digital pin. Connect the resistor to the negative rail.
- Place the DHT11 on the breadboard, connect negative to negative rail, connect power or vdd to positive rail and connect output to Analog 0.
- Load in the code and voila!
You will need the DHT library which can easily be found on the internet under the search of "DHT Library", i don't currently have the link on me sorry for the inconvenience. I hope you enjoyed my first project, good luck!