From b8ca5971c4d30033bdef025850f337642ac485c1 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Tue, 23 Dec 2025 15:32:37 +0100 Subject: [PATCH] count cycles nb --- the-cup.ino | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/the-cup.ino b/the-cup.ino index 7df37dd..d009988 100644 --- a/the-cup.ino +++ b/the-cup.ino @@ -26,11 +26,11 @@ #define RGB_BRIGHTNESS 4 // Change neopixel brightness (max 255) MFRC522DriverPinSimple ss_1_pin(SS_PIN); // Configurable, take an unused pin, only HIGH/LOW required, must be different to SS 2. - MFRC522DriverSPI driver_1{ss_1_pin}; - MFRC522 reader{driver_1}; // Create MFRC522 instance. +RTC_DATA_ATTR int nbCycles = 0; + const char *rootCACertificate = R"string_literal( -----BEGIN CERTIFICATE----- MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw @@ -71,6 +71,8 @@ void send_uid(char reader_uid[]); void setup() { Serial.begin(115200); while (!Serial) delay(10); + Serial.print("Nb cycles: "); + Serial.println(nbCycles++); pinMode(RC522_POWER_PIN, OUTPUT); digitalWrite(RC522_POWER_PIN, HIGH);