no use gpio for rc522 power
cut the rc522 led
This commit is contained in:
parent
d7750f81c9
commit
9ce89f2ab1
1 changed files with 1 additions and 4 deletions
|
|
@ -21,8 +21,8 @@
|
||||||
|
|
||||||
#include "Adafruit_MAX1704X.h"
|
#include "Adafruit_MAX1704X.h"
|
||||||
|
|
||||||
|
|
||||||
#define SS_PIN SDA
|
#define SS_PIN SDA
|
||||||
#define RC522_POWER_PIN 1
|
|
||||||
#define SLEEP_DURATION 1
|
#define SLEEP_DURATION 1
|
||||||
|
|
||||||
#define RGB_BRIGHTNESS 4 // Change neopixel brightness (max 255)
|
#define RGB_BRIGHTNESS 4 // Change neopixel brightness (max 255)
|
||||||
|
|
@ -82,8 +82,6 @@ void setup() {
|
||||||
|
|
||||||
measureBattery();
|
measureBattery();
|
||||||
|
|
||||||
pinMode(RC522_POWER_PIN, OUTPUT);
|
|
||||||
digitalWrite(RC522_POWER_PIN, HIGH);
|
|
||||||
reader.PCD_Init(); // Init each MFRC522 card.
|
reader.PCD_Init(); // Init each MFRC522 card.
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
MFRC522Debug::PCD_DumpVersionToSerial(reader, Serial); // Show details of PCD - MFRC522 Card Reader details.
|
MFRC522Debug::PCD_DumpVersionToSerial(reader, Serial); // Show details of PCD - MFRC522 Card Reader details.
|
||||||
|
|
@ -98,7 +96,6 @@ void loop() {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
delay(200);
|
delay(200);
|
||||||
digitalWrite(RC522_POWER_PIN, LOW);
|
|
||||||
ESP.deepSleep(SLEEP_DURATION * 1000000);
|
ESP.deepSleep(SLEEP_DURATION * 1000000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue