From 3f7811c15279ae09834a32bae27616ca1b22296b Mon Sep 17 00:00:00 2001 From: Will Barber Date: Sat, 28 Mar 2026 08:35:09 +0000 Subject: [PATCH 1/2] Fix ultrasound pulse measurement overflowing at long distance This occurs above ~5.6m --- resources/kit/arduino-fw.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/kit/arduino-fw.ino b/resources/kit/arduino-fw.ino index 06ef0b49..b408ef3f 100644 --- a/resources/kit/arduino-fw.ino +++ b/resources/kit/arduino-fw.ino @@ -61,7 +61,7 @@ void command_ultrasound() { digitalWrite(pulse, LOW); // measure the echo time on the echo pin - int duration = pulseIn(echo, HIGH, 60000); + long duration = pulseIn(echo, HIGH, 60000); Serial.print(microsecondsToMm(duration)); } From dcc0d4dc154c0484cd296aa77df9ebf8d8369263 Mon Sep 17 00:00:00 2001 From: Will Barber Date: Sat, 28 Mar 2026 08:38:20 +0000 Subject: [PATCH 2/2] Bump firmware version --- resources/kit/arduino-fw.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/kit/arduino-fw.ino b/resources/kit/arduino-fw.ino index b408ef3f..9eb3c763 100644 --- a/resources/kit/arduino-fw.ino +++ b/resources/kit/arduino-fw.ino @@ -3,7 +3,7 @@ // We communicate with the Arduino at 115200 baud. #define SERIAL_BAUD 115200 -#define FW_VER 2 +#define FW_VER 3 void setup() { Serial.begin(SERIAL_BAUD);