double cache = 0;
void setup() {
// put your setup code here, to run once:
pinMode(A0, INPUT);
pinMode(6, OUTPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
if (analogRead(A0) >= 512) {
digitalWrite(6, HIGH);
} else {
digitalWrite(6, LOW);
}
cache = double(analogRead(A0)) / 204;
Serial.println("Napiecie: " + String(cache));
}