From f7fc8069bd5075ac8e2047eadf0cca8e11ce0dbf Mon Sep 17 00:00:00 2001 From: Lurkars Date: Mon, 28 Dec 2020 19:27:15 +0100 Subject: [PATCH] build in led indicator --- led_bikewheel.ino | 3 +++ 1 file changed, 3 insertions(+) diff --git a/led_bikewheel.ino b/led_bikewheel.ino index 3459eff..499e0df 100644 --- a/led_bikewheel.ino +++ b/led_bikewheel.ino @@ -29,6 +29,7 @@ void setup() { Serial.begin(115200); pinMode(HALL_PIN, INPUT); + pinMode(LED_BUILTIN, INPUT); } void loop() @@ -41,6 +42,7 @@ void loop() // check HALL if turned if (digitalRead(HALL_PIN) == LOW) { + digitalWrite(LED_BUILTIN, HIGH); if (!change) { change = true; @@ -49,6 +51,7 @@ void loop() } else { + digitalWrite(LED_BUILTIN, LOW); change = false; }