Categories
TUTORIALS

LCD Screen Tutorial

Hello everyone, in this tutorial I will cover how to program and wire an arduino LCD Screen.  Essentially how this works is the arduino prints to the LCD, similar to how it would print to the serial monitor, except this is a more easy to see visual.

 

So, First a parts list.

You will need:

1 LCD screen, there is one included in your starter pack.  For this tutorial I have a slightly larger one.

1 Solderless breadboard

1 330 Ohm resistor

14 – 26 Wires,

If you are using the starter kit LCD, or have attached pin headers, you will only need 14

If you are not using the starter LCD, and have not attached pin headers, you will need 26 wires because you need to jump from the breadboard over to your LCD with another 12 wires.

10K Ohm potentiometer (Optional)

 

 

This is how it should look at the end.  As you can see there is a first set of wires, then wires that jump from those and lead off to the LCD screen.

This image below is how the breadboard should look before you attach the wires to jump to the LCD, or, before you attach the starter LCD with the pin headers.

Here we have the schematic, and breadboard view of the project.

 

 

I decided in the schematics and  in these two images, the schematic and breadboard view that it would be easier to go with the standard LCD.  And I have included the optional potentiometer just to demonstrate how this part would be wired in as well.

So, basically how this works is just like the Serial Monitor that the arduino itself has.  You can write values to this, and it will display in a visual manner that allows for easier interpretation.  Basically you can program the arduino to write to the LCD screen, and you can do this using straight print commands, or utilizing read commands.  For the purposes of this tutorial I will include both types of code.  The first, and simplest of the code types, is just the basic write as shown below.

This code is simple, and prints the words “hello, world!” to your arduino LCD screen.

 

The next block of code, reads sensor data, and prints it on the LCD screen.  In this case I have taken the smoothing function to write averages, and I have transferred it to the LCD screen to write an average to the LCD.

 

This code reads data from a sensor, and creates an index of readings out of the readings it gathers.  After four readings in this case, the index average is calculated and printed to the screen above the heading your current electrical usage.

 

Leave a Reply

Your email address will not be published. Required fields are marked *