Help needed with ESP8266 RFID program
i started down road of project knew require me gain additional skills in ide world (my experience level mid), ran stuck, , use assistance.
basic components:
8vdc-50vdc 5vdc regulator
esp8266 dev (nodemcu 12e variant)
rfid-rc522
rfid fob's
3.3v-5v single relay board
tri-color led
scope of project:
rfid badge reader interface open/close contacts on relay after 2 unique fob's scanned (11 fob id's stored locally on device). led provide visual indication of status (red=inactive, blue=first scan good, green=second scan good) . key elements: fob id's remain device, combination of 2 fob id's list required activate relay (but not same fob twice).
current work in progress code attached. sits, code accounts 21% space , 39% dynamic mem.
core function there, i'm failing dramatically on getting 2 step fob scan requirement work. i've been attempting try arrays , not, struggling. i'm not looking hand out, if there simple i'm overlooking, or methodology entirely should chase, please let me know. assistance @ point.
basic components:
8vdc-50vdc 5vdc regulator
esp8266 dev (nodemcu 12e variant)
rfid-rc522
rfid fob's
3.3v-5v single relay board
tri-color led
scope of project:
rfid badge reader interface open/close contacts on relay after 2 unique fob's scanned (11 fob id's stored locally on device). led provide visual indication of status (red=inactive, blue=first scan good, green=second scan good) . key elements: fob id's remain device, combination of 2 fob id's list required activate relay (but not same fob twice).
current work in progress code attached. sits, code accounts 21% space , 39% dynamic mem.
core function there, i'm failing dramatically on getting 2 step fob scan requirement work. i've been attempting try arrays , not, struggling. i'm not looking hand out, if there simple i'm overlooking, or methodology entirely should chase, please let me know. assistance @ point.
please add code message, inside code [/] tags. way it's hard read.
for problem, maybe (pseudo-code, won't compile):
for problem, maybe (pseudo-code, won't compile):
code: [select]
string rfid1 = "";
string rfid2 = "";
#define red = 0;
#define blue = 1;
#define green = 2;
loop() {
newrfid = readrfid();
if (newrfid) {
if (ingoodlist(newrfid)) {
if (rfid1 == "") {
rfid1 = newrfid;
setled(blue);
}
elif (newrfid != rfid1) {
rfid2 = newrfid;
setled(green);
}
}
if (rfid1 && rfid2) {
doopopened = millis();
opendoor(true);
rfid1 = "";
rfid2 = "";
}
}
if (dooropened - millis() > dooropeninterval) {
opendoor(false);
setled(red);
}
}
Arduino Forum > Using Arduino > Project Guidance > Help needed with ESP8266 RFID program
arduino
Comments
Post a Comment