Arduino - Part III

Arduino – Part III

ARDUINO PART III – DHT22, LCD & SD CARD READER
In this set of arduino lessons you will learn how to:

  1. Use the DHT22 sensor to record temperature and humidity.
  2. Write this data to an SD card.
  3. Display and live-update these on an LCD screen.

DHT 22 – Temperature & Humidity
Follow this tutorial to start using the DHT 22. It will show you how to install the DHT library, connect the sensor and display the data in the serial monitor.
Please note: At the end of the video, Dejan advertises his tutorial for the LCD. Do not rely on that one because he uses an older version than we have so the code won’t work.

Written version if you prefer that:
https://howtomechatronics.com/tutorials/arduino/dht11-dht22-sensors-temperature-and-humidity-tutorial-using-arduino/

SD Card 
The SD card tutorial will help you understand how it works, but only test if the Arduino recognizes it. You will not be writing data onto it yet.
Please format the SD card on your computer before using it.

LCD 
There is no video on this one, but it’s definitely the simplest. This tutorial will let you print up to 16 characters on each line. It is pretty straightforward once you read the code.
https://arduinogetstarted.com/tutorials/arduino-lcd-i2c

Combining the Three
In the next steps, you will combine all three components into one code script. The code is on the Teams page in the TA Questions channel under files.
https://uoregon.sharepoint.com/:f:/r/sites/O365_Barcelona_Urban_Design_22/Shared%20Documents/01%20TA%20QUESTIONS%20and%20ARDUINO/ARDUINO%20-%20DHT,LCD%20%26%20SD?csf=1&web=1&e=QU9WLA
Here is the initial wiring diagram, which is just how I did it, but there are multiple ways. If you have the libraries downloaded from the previous set of tutorials, you should be able to upload the script to the Arduino. I will post a video recording of what each portion of the script does this afternoon. It’s not very aesthetic, but it should be straightforward.

Video: