Skip to content

Commit

Permalink
Merge pull request #2 from IncursioHack/main
Browse files Browse the repository at this point in the history
Implementation of RFID in the new Bruce.
  • Loading branch information
bmorcelli authored May 7, 2024
2 parents f895978 + be1c099 commit 3db84a0
Show file tree
Hide file tree
Showing 6 changed files with 2,357 additions and 3 deletions.
14 changes: 14 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ build_flags =
-DSDCARD_MISO=36
-DSDCARD_MOSI=26

-DGROOVE_SDA=32
-DGROOVE_SCL=33

lib_deps =
${common.lib_deps}

Expand Down Expand Up @@ -146,6 +149,9 @@ build_flags =
-DSDCARD_SCK=0
-DSDCARD_MISO=36
-DSDCARD_MOSI=26

-DGROOVE_SDA=32
-DGROOVE_SCL=33

lib_deps =
https://github.com/tanakamasayuki/I2C_AXP192
Expand Down Expand Up @@ -205,6 +211,8 @@ build_flags =
-DSDCARD_MISO=39
-DSDCARD_MOSI=14

-DGROOVE_SDA=2
-DGROOVE_SCL=1
lib_deps =
${common.lib_deps}

Expand Down Expand Up @@ -246,6 +254,9 @@ build_flags =
-DSDCARD_MISO=36
-DSDCARD_MOSI=26

-DGROOVE_SDA=32
-DGROOVE_SCL=33

lib_deps =
${common.lib_deps}

Expand Down Expand Up @@ -309,6 +320,9 @@ build_flags =
-DSDCARD_MISO=39
-DSDCARD_MOSI=14

-DGROOVE_SDA=32
-DGROOVE_SCL=33

lib_deps =
${common.lib_deps}

9 changes: 6 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ TFT_eSprite draw = TFT_eSprite(&tft);
#include "settings.h"
#include "dpwo.h"
#include "wg.h"
#include "rfid.h"
#include "Wire.h"
#include "mfrc522_i2c.h"

#ifdef CARDPUTER
#include "bad_usb.h"
Expand Down Expand Up @@ -187,7 +190,7 @@ void loop() {
break;
case 2: // RF
options = {
{"Scan/copy", [=]() { displayRedStripe("Scan/copy"); }},
{"Scan/copy", [=]() { displayRedStripe("Scan/Copy"); }},
{"Replay", [=]() { displayRedStripe("Replay"); }},
{"Spectrum", [=]() { displayRedStripe("Spectrum"); }},
{"Main Menu", [=]() { backToMenu(); }},
Expand All @@ -198,13 +201,13 @@ void loop() {
break;
case 3: // RFID
options = {
{"Scan/copy", [=]() { displayRedStripe("Scan/copy"); }},
{"Scan/copy", [=]() { rfid_setup(); }},
{"Replay", [=]() { displayRedStripe("Replay"); }},
{"Main Menu", [=]() { backToMenu(); }},
};
delay(200);
loopOptions(options,false,true,"RFID");
delay(1000); // remover depois, está aqui só por causa do "displayRedStripe"
//delay(1000); // remover depois, está aqui só por causa do "displayRedStripe"
break;
case 4: //Other
options = {
Expand Down
Loading

0 comments on commit 3db84a0

Please sign in to comment.