From 45d6421f323fc8a24f4642949f26027123d62475 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Tue, 27 Jan 2026 19:29:29 +0100 Subject: [PATCH] kluk does not use battery anymore --- the-cup.ino | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/the-cup.ino b/the-cup.ino index 120ba62..f001cde 100644 --- a/the-cup.ino +++ b/the-cup.ino @@ -19,11 +19,7 @@ #include #include -#include "Adafruit_MAX1704X.h" - - #define SS_PIN SDA -#define SLEEP_DURATION 1 #define RGB_BRIGHTNESS 4 // Change neopixel brightness (max 255) @@ -31,10 +27,6 @@ MFRC522DriverPinSimple ss_1_pin(SS_PIN); // Configurable, take an unused pin, on MFRC522DriverSPI driver_1{ss_1_pin}; MFRC522 reader{driver_1}; // Create MFRC522 instance. -RTC_DATA_ATTR int nbCycles = 0; - -Adafruit_MAX17048 lipo; - const char *rootCACertificate = R"string_literal( -----BEGIN CERTIFICATE----- MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw @@ -76,12 +68,8 @@ void setup() { #ifdef DEBUG Serial.begin(115200); while (!Serial) delay(10); - Serial.print("Nb cycles: "); - Serial.println(nbCycles++); #endif - measureBattery(); - reader.PCD_Init(); // Init each MFRC522 card. #ifdef DEBUG MFRC522Debug::PCD_DumpVersionToSerial(reader, Serial); // Show details of PCD - MFRC522 Card Reader details. @@ -96,16 +84,6 @@ void loop() { } else { delay(200); - ESP.deepSleep(SLEEP_DURATION * 1000000); - } -} - -void measureBattery() { - if (nbCycles % 10) { - lipo.begin(); - if (lipo.cellVoltage() < 2.6) { - displayError(); - } } }