int DC = 0, AC = 0;
float voltsDC, voltsAC;
void setup()
{
Serial.begin(9600);
}
void loop()
{
DC = analogRead(A0);
voltsDC = DC * 12.0 / 1023.0 ; //por relacion de resistencias
Serial.println(voltsDC);
}
void readAC()
{
AC = analogRead(A1);
voltsAC = map(AC, 1023, 0, 0, 127);
Serial.println(voltsAC);
delayMicroseconds(294);
}