#include <LiquidCrystal.h>
#define RS 25
#define EN 12
#define D4 27
#define D5 32
#define D6 2
#define D7 4
#define POTENCIOMETRO12 22
#define POTENCIOMETRO21 23
LiquidCrystal lcd (RS,EN,D4,D5,D6,D7);//
float POTENCIOMETRO1;
float POTENCIOMETRO2;
float Voltaje1=0;
float Voltaje2=0;
void setup() {
lcd.begin(16,2);
lcd.clear();
lcd.setCursor(6,0);
lcd.print("hola");
delay(3000);
Serial.begin(9600);
}
void loop() {
POTENCIOMETRO1=analogRead(34);
POTENCIOMETRO2=analogRead(15);
Voltaje1=POTENCIOMETRO1*(3.3/4095);
Voltaje2=POTENCIOMETRO2*(3.3/4095);
lcd.setCursor(6,0);
lcd.print(" ");
lcd.setCursor(6,0);
lcd.print('voltaje');
lcd.setCursor(11,0);
lcd.print("Voltios");
delay(200);
Serial.print(Voltaje1);
Serial.print(',');
Serial.println(Voltaje2);
}