From 352c0057635e5c3ad63860bcebf8a49909bb0799 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Thu, 18 Dec 2025 18:21:09 +0100 Subject: [PATCH] use now esp32-C6 --- the-cup.ino | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/the-cup.ino b/the-cup.ino index 5e1d3e4..70d85ec 100644 --- a/the-cup.ino +++ b/the-cup.ino @@ -1,32 +1,26 @@ /* Pin layout used: * ----------------------------------------------------------------------------------------- - * MFRC522 ESP8266 -* Reader/PCD Feather Huzzah + * MFRC522 ESP32C6 +* Reader/PCD Feather * Signal Pin Pin * ----------------------------------------------------------------------------------------- * SPI SS 1 SDA(SS) SDA/4 - * SPI SCK SCK 14 / SCK - * SPI MOSI MOSI 13 / MOSI - * SPI MISO MISO 12 / MISO + * SPI SCK SCK SCK + * SPI MOSI MOSI MOSI + * SPI MISO MISO MISO * */ #include // https://github.com/tzapu/WiFiManager - -#include // https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/readme.html -#include -#include - -// #include "certs.h" - +#include #include // https://github.com/OSSLibraries/Arduino_MFRC522v2 #include #include #include -#define LED_PIN 15 -#define SS_PIN 4 +#define LED_PIN LED_BUILTIN +#define SS_PIN SDA #define SLEEP_DURATION 1 MFRC522DriverPinSimple ss_1_pin(SS_PIN); // Configurable, take an unused pin, only HIGH/LOW required, must be different to SS 2. @@ -76,13 +70,11 @@ void send_uid(char reader_uid[]) { //if you get here you have connected to the WiFi Serial.println("connected...yeey :)"); } - auto client = std::make_unique(); - client->setInsecure(); HTTPClient https; Serial.print("[HTTPS] begin...\n"); // configure traged server and url - https.begin(*client, "https://mood.robiweb.net/rfid_tags"); // HTTP + https.begin("https://mood.robiweb.net/rfid_tags"); // HTTP https.addHeader("Content-Type", "application/json"); // start connection and send HTTP header and body