#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 Motor");
delay(1000);
lcd.clear();
lcd.print("Motor On");
delay(1500);
lcd.clear();
}
void loop()
{
lcd.setCursor(0,0);
lcd.print("Speed Motor");
int potValue = analogRead(A0);
int displayValue = map(potValue, 0, 1023, 0, 255);
lcd.setCursor(0,1);
lcd.print(displayValue);
lcd.setCursor(10,1);
lcd.print("RPM");
delay(500);
lcd.clear();
}