We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57ce749 commit d4fc0d2Copy full SHA for d4fc0d2
examples/LevelSensor/LevelSensor.ino
@@ -59,7 +59,7 @@ void setup(void) {
59
void loop(void) {
60
const int threshold = 1;
61
int value = analogRead(sensorPin);
62
- double percent = (double) 100. - (value/1204.*100.);
+ double percent = (double) 100. - (value/1024.*100.);
63
if (abs(percent - lastValue) >= threshold) {
64
Serial.print("log: Value: ");
65
Serial.print(value);
0 commit comments