From 2dc3f427eb5c036b5ef32f4fa581b057a6355490 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Fri, 14 Apr 2023 09:47:08 -0400 Subject: [PATCH] go back to Wire if no clockgen to avoid crash --- cubesatsim/cubesatsim.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index ec89395b..07c21bf2 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -5033,7 +5033,8 @@ void start_clockgen() { if (clockgen.begin(&Wire1) != ERROR_NONE) { /* There was a problem detecting the IC ... check your connections */ - Serial.println("No Si5351 detected on bus 2 ... Check your wiring or I2C ADDR!"); + Serial.println("No Si5351 detected on bus 2 ... Check your wiring or I2C ADDR!"); + clockgen.begin(&Wire); // go back to Wire so that it doesn't lock up with no clockgen return; } else Serial.println("Si5351 detected on bus 2");