/* Refer to: http://www.bristolwatch.com/hall_effect/arduino_hall_effect.htm Lewis Loflin lewis@bvu.net LiquidCrystal Library as a voltmeter Demonstrates the use a 16x2 LCD display. The LiquidCrystal library works with all LCD displays that are compatible with the Hitachi HD44780 driver. There are many of them out there, and you can usually tell them by the 16-pin interface. connect the ouput of the Hall sensor to analog(0). The circuit: * LCD RS pin to digital pin 12 * LCD R/W to GND * LCD E pin to digital pin 11 * LCD D4 pin to digital pin 5 * LCD D5 pin to digital pin 4 * LCD D6 pin to digital pin 3 * LCD D7 pin to digital pin 2 * 10K pot: * ends to +5V and ground * wiper to LCD VO pin (pin 3) */ // include the library code: #include "LiquidCrystal.h" int sensorValue; float volts = 5.0 / 1023; // volts per step on ADC float temp = 0; // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { // set up the LCD's number of columns and rows: lcd.begin(16, 2); // 16 char by 2 lines lcd.noCursor(); // Hides the LCD cursor. } void loop() { temp = analogRead(0) * volts; lcd.setCursor(0, 0); lcd.print(temp); delay(100); } // end loop