DIY Inventor
Published

Arduino DIY Potentiometer Value Display on LCD 16x2

This project is going to tell How to display the potentiometer Value on LCD.

BeginnerFull instructions provided8,303
Arduino DIY Potentiometer Value Display on LCD 16x2

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Alphanumeric LCD, 16 x 2
Alphanumeric LCD, 16 x 2
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
10K
×1
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
LiquidCrystal.h Library

Story

Read more

Schematics

Circuit Diagram

Connection of LCD

Connect the First pin from the left of LCD (GND pin) with GND pin of Arduino.
Connect the Second pin from the left of LCD (VCC pin) with VCC pin of Arduino.
Connect the Third pin from the left of LCD (V0 pin) with GND pin of Arduino.
Connect the Fourth pin from the left of LCD (RS pin) with 11 pin of Arduino.
Connect the Fifth pin from the left of LCD (R/W pin) with GND pin of Arduino.
Connect the Sixth pin from the left of LCD (E pin) with 10 pin of Arduino.
Connect the Eleventh pin from the left of LCD (D4 pin) with 5 pin of Arduino.
Connect the Twelveth pin from the left of LCD (D5 pin) with 4 pin of Arduino.
Connect the Thirteen pin from the left of LCD (D6 pin) with 3 pin of Arduino.
Connect the Fourteenth pin from the left of LCD (D7 pin) with 2 pin of Arduino.
Connect the Fifteenth pin from the left of LCD (5V pin) with 1 K Resistor with 2 pin of Arduino.
Connect the Last pin from the left of LCD (GND pin) with GND pin of Arduino.
Connection of Potentiometer

Connect the first pin from the left of Potentiometer (GND Pin) with GND Pin of Arduino
Connect the middle pin from of Potentiometer (Output) with GND Pin of Arduino
Connect the last pin from the left of Potentiometer (5V Pin) with 5V Pin of Arduino

Code

Code

C/C++
#include <LiquidCrystal.h>
int sensorValue = 0;

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(11, 10, 5, 4, 3, 2);

void setup() 
{
  pinMode(A0, INPUT);
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  Serial.begin(9600);
  lcd.begin(16,2);
  lcd.print("Starting System");
    delay(1000);
    lcd.clear();
    lcd.print("System On");
    delay(1500);  
  
lcd.clear();

}

void loop() 
{
lcd.setCursor(0,0);
lcd.print("  DIY Inventor");
    

  sensorValue = analogRead(A0);
  Serial.println(sensorValue);

lcd.setCursor(0,1);
lcd.print(sensorValue);
lcd.setCursor(4,1);
lcd.print("Sensor Value");
  

  delay(500);
  lcd.clear();
}

Credits

DIY Inventor

DIY Inventor

0 projects • 17 followers
Hello Guys, My name is Krishna Agarwal , and I'm passionate about Making DIY Projects. Here I make Arduino and Robotics related projects.

Comments