From c7a31eea043a72ec13d72a61b9b60d5dfb178e64 Mon Sep 17 00:00:00 2001 From: subDesTagesMitExtraKaese <59580649+subDesTagesMitExtraKaese@users.noreply.github.com> Date: Mon, 28 Jun 2021 18:24:41 +0200 Subject: [PATCH] Update Geiger-Counter-Shield.ino Fixed warning LED pin number. Enable warning regardless of display mode. --- Geiger-Counter-Shield.ino | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Geiger-Counter-Shield.ino b/Geiger-Counter-Shield.ino index 79c83e7..09c079e 100644 --- a/Geiger-Counter-Shield.ino +++ b/Geiger-Counter-Shield.ino @@ -217,15 +217,16 @@ void loop() setDisplayStatus(displayStatus); } + if (cps > CPS_WARNING) // Lit LED2 for warning + PORTC |= _BV (2); + else + PORTC &= ~_BV (2); + if (displayStatus == 0) { // Display CPS and bargraph if the CPS display is selected clearDisplay(0, 0, 5); lcd.setCursor(0, 0); if (cps > 10000) // Limit maximum possible CPS cps = 10000; - if (cps > CPS_WARNING) // Lit LED2 for warning - PORTC |= _BV (1); - else - PORTC &= ~_BV (1); lcd.print(cps); drawBars(); }