Using an Arduino to control LCDs and Sensors

1. Introduction

In this lecture, we used an Arduino Uno R3 to control LCDs and sensors. We learned about the the functionality provided by libraries,  how to control an LCD screen,  and how to  use sensors to record data.

2. The Code and the Results

In Figure 1 we can see an example of using the LiquidCrystal library to control our LCD screen. 

  

Figure 1. An example of using the LiquidCrystal library to control our LCD screen


In Figure 2 we can see an example of using the LiquidCrystal library to control the LCD with a more advanved example. Here we're making "Durango" appear and dissapear then track accross the LCD until it rests in its original position, then the loop restarts.

  

Figure 2. An example of using the LiquidCrystal library to control a more advanced example on our LCD screen


In Figure 3 we can see an example of using a thermistor to read the temperature, and the output is being printed to the LCD. In the video, the thermistor is covered to increase the temperature reading.

 

Figure 3. An example of using a thermistor to read the temperature and an LCD to display that reading


In Figure 4 we can see an example of using a DHT11 temperture/humidity sensor to read the temperature and humidity and output that result to the LCD screen. After a lot of troubleshooting I determined that our DHT11 sensor is not working and thats why the outputs are "0" for both readings.

  

Figure 4. An example of using the DHT11 to read the temperature and an LCD to display that reading


In Figure 5 we can see an example of using an integrated circuit temperature sensor to read the temperature and output that result to the LCD screen. 

Figure 5. An example of using an integrated circuit temperature sensor to read the temperature and an LCD to display that reading


In Figure 6 we can see an example of using an IR receiver module to read the inputs from a remote and output the button that was pressed to the screen. I had one of the older model remotes so my code didn't change from the default.

Figure 6. An example of using an IR receiver module to read the inputs from a remote


In Figure 7 we can see an example of using a barebones Mega 328p to control a blinking LED. This is done by removing the 328p from the board and rerouting some of the connections to make it programmable on a breadboard. 

Figure 7. An example of using a barebones Mega 328p to control a blinking LED


In Figure 8 we can see an example of using a barebones Mega 328p to control a mobile temperature sensor setup. This setup is using a DHT11 as the temperature sensor and it is displaying the reading using the LCD screen. A interrupt service routine is used to update the temperature every 4 seconds. This setup is using the broken DHT11 sensor so it does not actually give temperature output.

Figure 7. An example of using a barebones Mega 328p to control a mobile temperature sensor setup


2. Discussion

This lab was a great introduction to using an arduino to take data from sensors. In it we were able to experiment with a few sensor types, and learn how to display those readings without using the serial monitor we have previously beeen relying on. The last portion was the best learning experience, as it really displays how an arduino board is just a PCB with a microcontroller attached rather than a microcontroller itself.