# include <LiquidCrystal.h>
LiquidCrystal lcd ( 12, 11, 5, 4, 3, 2 );
int hold,koma;
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
}
void loop()
{
float vin=(analogRead(A0));// Voltmeter
float voltage = vin * 11;
voltage=voltage / 1;
lcd.setCursor(0,0);
lcd.print("V");
lcd.print(voltage,3); // Tanda ",4" untuk menampilkan 4 dijit desimal
float vinamp=(analogRead(A1));// Amperemeter
float ampere = vinamp/0.1;
lcd.setCursor(9,0);
lcd.print("A");
lcd.print(ampere,3);
float wattmeter = voltage*ampere;//wattmeter
lcd.setCursor(0,1);
lcd.print("W");
lcd.print(wattmeter);
lcd.setCursor(7,1);
lcd.print("Prtc0.22");
}