diff --git a/the-cup.ino b/the-cup.ino index f001cde..d2a1987 100644 --- a/the-cup.ino +++ b/the-cup.ino @@ -20,8 +20,12 @@ #include #define SS_PIN SDA +#define DEBUG + +const int RED_PIN = 5; +const int GREEN_PIN = 6; +const int BLUE_PIN = 7; -#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}; @@ -129,7 +133,7 @@ void postUid(char reader_uid[]) { Serial.print("[HTTPS] begin...\n"); #endif // configure traged server and url - https.begin("https://mood.robiweb.net/rfid_tags"); // HTTP + https.begin("https://robi.kluk.fr/rfid_tags"); // HTTP https.addHeader("Content-Type", "application/json"); // start connection and send HTTP header and body @@ -172,11 +176,13 @@ void byte_to_string(byte array[], unsigned int len, char buffer[]) { } void displayError() { - rgbLedWrite(RGB_BUILTIN, RGB_BRIGHTNESS, 0, 0); // Red + analogWrite(RED_PIN, 200); delay(1000); + analogWrite(RED_PIN, 0); } void displaySuccess() { - rgbLedWrite(RGB_BUILTIN, 0, RGB_BRIGHTNESS, 0); // Green + analogWrite(GREEN_PIN, 200); delay(1000); + analogWrite(GREEN_PIN, 0); }