diff --git a/the-cup.ino b/the-cup.ino index 607e839..ea4786e 100644 --- a/the-cup.ino +++ b/the-cup.ino @@ -21,6 +21,7 @@ #define LED_PIN LED_BUILTIN #define SS_PIN SDA +#define RC522_POWER_PIN 1 #define SLEEP_DURATION 1 #define RGB_BRIGHTNESS 4 // Change neopixel brightness (max 255) @@ -74,6 +75,8 @@ void setup() { pinMode(LED_PIN, OUTPUT); + pinMode(RC522_POWER_PIN, OUTPUT); + digitalWrite(RC522_POWER_PIN, HIGH); reader.PCD_Init(); // Init each MFRC522 card. } @@ -85,6 +88,7 @@ void loop() { } else { delay(200); + digitalWrite(RC522_POWER_PIN, LOW); ESP.deepSleep(SLEEP_DURATION * 1000000); } }