// This example prints the value of analog input port 0 // onto a Liquid Crystal Display (LCD). This code was // written for the Wiring board. In Arduino, the // LiquidCrystal() call is slightly different. #include // include the LiquidCrystal library int r = 0; // analog input pin with potmeter // lcd object connected to digital i/o pins 13-15 and port 2. // In Arduino, the LiquidCrystal() call is slightly different. LiquidCrystal myLCD = LiquidCrystal(13,14,15,2); void setup() { } void loop() { myLCD.clear(); // clear the lcd myLCD.home(); // send cursor to position (0,0) myLCD.print("Value is:"); int v = analogRead(r); // read analog value into v myLCD.setCursor(10, 1); myLCD.print(v); delay(200); }