Skip to content

Instantly share code, notes, and snippets.

@arduinothai
Last active May 18, 2018 09:20
Show Gist options
  • Save arduinothai/e91205f761a32370a9f7c5a7f6d09eba to your computer and use it in GitHub Desktop.
Save arduinothai/e91205f761a32370a9f7c5a7f6d09eba to your computer and use it in GitHub Desktop.
int val11;
int val2;
void setup()
{
Serial.begin(9600);
Serial.println("Voltage: ");
Serial.print("V");
}
void loop()
{
float temp;
val11=analogRead(A0);
temp=val11/4.092;
val11=(int)temp;//
val2=((val11%100)/10);
Serial.println(val2);
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment