Introduction: Arduino Lcd

Picture of Arduino Lcd

Hello everyone, I have plans of making a RC car using 2 Arduino UNOs. One of the Arduino I will use in making a remote and the other for the car, and these 2 will communicate using the 433mhz RF. but now I haven't gotten to that yet. This instructable is for my remote control idea I plan on using 4 pushbuttons, for Foward, Backward, left and Right control of the car, but I only made a test using one pushbuttons.

Parts needed.

Arduino lcd
1 pushbutton
Arduino uno
Jumpers
2 1kohms resistors
1 potentiometer

Let's begin.

Step 1: Step 1. Push Button and Potentiometer

Picture of Step 1. Push Button and Potentiometer

My first step was to connect the push button and potntiometer to GND and 5,as the picture above shows.The push button is later connected to pin6 of the arduino, and when pressed the LCD displays on, and when when pressed the LCD displays off. The potentiometer on the other hand is connected to the V0 of the LCD.

Step 2: LCD

Picture of LCD

before we can use the LCD, we have to solder pins to it,if not we cannot be able to connect it, but i guess if you are reading this article your LCD already have pins soldered. Reading the LCD pins from left to right.

LCD pins Connection

vss ________ GND

VDD ________ +5V

V0 ________ potentiometer

Rs ________ arduino pin12

Rw ________ GND

E ________ arduino pin11

D0 to D3 ________ empty(no connections)
D4 ________ arduino pin5

D5 ________ arduino pin4

D6 ________ arduino pin3

D7 ________ arduino pin2

A ________ +5V

K ________ GND

Step 3: Arduino Sketch

Picture of Arduino Sketch

// include the library code:

#include<LiquidCrystal.h>

int state=1;//initialize push button state

int pb=6;//initialize push button state

// initialize the library with the numbers of the interface pins

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {

pinMode(pb,INPUT);//set pb as input

// set up the LCD's number of columns and rows:

lcd.begin(16, 1);

lcd.setCursor(0,1);

lcd.clear();//clear LCD

}

void loop() {

//LCD library command for no blink

lcd.noBlink();

state=digitalRead(pb);

if(state==0){

//to get a steady input, the LCD has to clear and write the message after the delay //without the .clear() command, the message will run from right to left or verse varsa

//in the LCD, using the clear and a short delay message, the LCD clears and prints the meaage a

//again after the delay time.

lcd.clear();

lcd.print("off");//print message on the LCD

delay(10); //delay message

lcd.clear();//clear LCD

delay(10);//delay message again

}

else

{

lcd.clear();

lcd.print("on");

delay(10);

lcd.clear();

delay(10);

state=1;

}

}

Step 4: Finally

power up your arduino and breadboard and test what you have done, when you rotate the potentiometer message gets brighter or disappears and when you push the button the message changes to "ON" and when you release it shows "OFF", you can write a program to toggle the button by debouncing it. As you can see from the video mine is working as i expected.Take your time and play around with it. ARIGATO :)

Step 5:

Comments

casey010 (author)2015-05-03

awesome !!

holidayv (author)2015-05-02

well done. thanks for sharing

seamster (author)2015-05-02

Nicely done. Thanks for sharing this!

About This Instructable

7,104views

55favorites

License:

Bio: bachelors degree in Electrical Engineering, love developing hardware systems on both microcontrollers and PLC.
Add instructable to: