From 8d88780e5a427da9166e71bba61b8f3988c770a9 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sun, 24 Dec 2023 19:58:31 +0100 Subject: [PATCH] change pin to A3, disable mode-switching --- src/main.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 60be935..1aac577 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,7 +5,7 @@ #define NUMPIXELS 8 #define PIN_NEOPIXEL_ONBOARD 39 -#define PIN_NEOPIXEL 9 +#define PIN_NEOPIXEL 8 #define NEOPIXEL_POWER 38 #define PROTO_ICMP 1 @@ -15,7 +15,7 @@ enum mode{Disco, Gauge}; enum mode active_mode = Disco; -char ssid[] = "MySSID"; // your network SSID (name) +char ssid[] = "MyNetwork"; // your network SSID (name) char pass[] = "MyPassphrase"; // your network password (use for WPA, or use as key for WEP) Adafruit_NeoPixel pixels(NUMPIXELS, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800); @@ -139,18 +139,19 @@ extern "C" void app_main() // Arduino-like loop() while(true){ - int capacity = touchRead(8); - if (capacity > 20000) { - long cur_time = millis(); - if (cur_time - last_touch > 500) { - active_mode = mode((active_mode + 1) % (Gauge + 1)); - pixels.clear(); - printf("changed mode: %u!\n", active_mode); - if (active_mode == Gauge) { - last_gauge_show = millis(); - } - last_touch = cur_time; - } - } + //int capacity = touchRead(8); + //if (capacity > 20000) { + // long cur_time = millis(); + // if (cur_time - last_touch > 500) { + // active_mode = mode((active_mode + 1) % (Gauge + 1)); + // pixels.clear(); + // printf("changed mode: %u!\n", active_mode); + // if (active_mode == Gauge) { + // last_gauge_show = millis(); + // } + // last_touch = cur_time; + // } + //} + ; } }