Setting up the LCD on the Arduino

  • calendar_today  Oct, 25 2018
  • visibility  1,568

In this article we’re going to go through the steps of setting up a 16/2 LCD on an Arduino, we know a lot of articles out there already that shows how to do this but today we are going to go through pretty much every function available in the liquid crystal library and show you what each one does and how to use it and where to put it in your code. We will show you how to set up the LCD on the Arduino.

How to set up the LCD on the Arduino

  1. Setup the LCD connects the jumper wire from pin 1 of the LCD over to a ground rail.
  2. From pin 2 of LCD connect a jumper wire to the positive rail.
  3. Then from pin 3 to the LCD, jumper wire to the middle pin of a 10K potentiometer. The potentiometer allows you to adjust the contrast of the characters.
  4. Now run a jumper wire from pin to the LCD over to the digital pin 12 of the Arduino.
  5. Then connect another jumper wire from pin 5 of the LCD to ground.
  6. After following point 3, from the pin 6 of the LCD, connect a jumper wire over to the digital pin 11 of the Arduino.
  7. And working from the other side pin 16 of the LCD connects to ground.
  8. Now, it’s time to connect the 220-ohm resistor from pin 15 of the LCD to the positive rail.
  9. From the pin 14 of the LCD than that jumper wire over the digital pin 2 of the Arduino.
  10. Now, connect the pin 13 of the LCD with the pin 3 of the Arduino.
  11. After this you will connect the pin 12 of the LCD with the pin 4 of the Arduino.
  12. Now, connect the pin 11 of the LCD with the pin 5 of the Arduino.
  13. Now, the last step of connecting is to connect the one outside of the potentiometer to the ground and connect the other side of the potentiometer with the positive rail.

  14. And then obviously connect the rails of your breadboard over the ground.
  15. And five volts pin of the Arduino and your LCD you should line up.
  16. Now, you will get the bunch of gibberish right now! Because you don’t have uploaded any kind of code on your board but you can do an amazing thing and that is just for the contrast, adjust the potentiometer. You can also replace the 220ohm resistor with the potentiometer and with that, you can easily adjust the brightness of the backlight.
    After step 16, you are allowed to upload the code on your board. For uploading the code, you will need an Arduino editor via which you can easily upload your code. And Enjoy