From 9fb2f5245681a6f3fe3f2a7be8676ef41e352992 Mon Sep 17 00:00:00 2001 From: Nico Stuurman Date: Thu, 12 Oct 2023 13:02:18 -0700 Subject: [PATCH] ArduinoCounter: Fix double counting pulses bug when inverted. --- DeviceAdapters/ArduinoCounter/ArduinoCounter/ArduinoCounter.ino | 1 - 1 file changed, 1 deletion(-) diff --git a/DeviceAdapters/ArduinoCounter/ArduinoCounter/ArduinoCounter.ino b/DeviceAdapters/ArduinoCounter/ArduinoCounter/ArduinoCounter.ino index 5da132724..2141a03e9 100644 --- a/DeviceAdapters/ArduinoCounter/ArduinoCounter/ArduinoCounter.ino +++ b/DeviceAdapters/ArduinoCounter/ArduinoCounter/ArduinoCounter.ino @@ -104,7 +104,6 @@ void loop() { if (counting) { if (invert) { if (inputWas && !(PIND & B00000100)) { - counter++; inputWas = LOW; PORTB = 1; } else if (!inputWas && (PIND & B00000100)) {