Upgraded firmware for Simone Giertz's Every Day Calendar that links an ATProto-powered ESP32, for sync with goals.garden 🌱
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make brightness buttons simple on/off

+4 -4
+4 -4
firmware/sketches/EverydayCalendar/EverydayCalendar.ino
··· 44 44 } 45 45 46 46 void loop() { 47 - static Point previouslyHeldButton = {0xFF, 0xFF}; // 0xFF and 0xFF if no button is held 47 + static Point previouslyHeldButton = {(char)0xFF, (char)0xFF}; // 0xFF and 0xFF if no button is held 48 48 static uint16_t touchCount = 1; 49 49 static const uint8_t debounceCount = 3; 50 50 static const uint16_t clearCalendarCount = 1300; // ~40 seconds. This is in units of touch sampling interval ~= 30ms. 51 - Point buttonPressed = {0xFF, 0xFF}; 51 + Point buttonPressed = {(char)0xFF, (char)0xFF}; 52 52 bool touch = cal_touch.scanForTouch(); 53 53 // Handle a button press 54 54 if(touch) ··· 56 56 // Brightness Buttons 57 57 if(cal_touch.y == 31){ 58 58 if(cal_touch.x == 4){ 59 - brightness -= 3; 59 + brightness = 0; 60 60 }else if(cal_touch.x == 6){ 61 - brightness += 2; 61 + brightness = 200; 62 62 } 63 63 brightness = constrain(brightness, 0, 200); 64 64 Serial.print("Brightness: ");