Skip to content

Commit

Permalink
Rf433 - Full Jammer and Intermittent Jammer
Browse files Browse the repository at this point in the history
Inclusion of RF433T with Full Jammer and Intermittent Jammer.
  • Loading branch information
IncursioHack authored Jun 3, 2024
1 parent 50870ba commit e848d45
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ void loop() {
options = {
//{"Scan/copy", [=]() { displayRedStripe("Scan/Copy"); }},
//{"Replay", [=]() { displayRedStripe("Replay"); }},
{"Spectrum", [=]() { rf_spectrum(); }}, //@IncursioHack
{"Spectrum", [=]() { rf_spectrum(); }}, //@IncursioHack
{"Jammer Itmt", [=]() { rf_jammerIntermittent(); }}, //@IncursioHack
{"Jammer Full", [=]() { rf_jammerFull(); }}, //@IncursioHack
{"Main Menu", [=]() { backToMenu(); }},
};
delay(200);
Expand Down
77 changes: 77 additions & 0 deletions src/rf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ void initRMT() {
ESP_ERROR_CHECK(rmt_driver_install(rxconfig.channel, 2048, 0));
}

bool sendRF = false;

void rf_spectrum() { //@IncursioHack - https://github.com/IncursioHack ----thanks @aat440hz - RF433ANY-M5Cardputer

tft.fillScreen(TFT_BLACK);
Expand Down Expand Up @@ -70,10 +72,85 @@ void rf_spectrum() { //@IncursioHack - https://github.com/IncursioHack ----thank
}
vRingbufferReturnItem(rb, (void*)item);
}
if (checkEscPress()) {
rmt_rx_stop(RMT_RX_CHANNEL);
returnToMenu=true;
break;
}
}
// Checks para sair do while

rmt_rx_stop(RMT_RX_CHANNEL);
delay(10);



}


void rf_jammerFull() { //@IncursioHack - https://github.com/IncursioHack - thanks @EversonPereira - rfcardputer
tft.fillScreen(TFT_BLACK);
tft.println("");
tft.println(" RF433 - Jammer Full");
tft.println("");
tft.println("");
tft.setTextSize(2);
sendRF = true;
tft.println("Sending... Press ESC to stop.");
while (sendRF) {
delay(1000);
if (checkEscPress()) {
sendRF = false;
returnToMenu=true;
break;
}


digitalWrite(GROVE_SDA, HIGH);
delay(20000);

}
digitalWrite(GROVE_SDA, LOW);



}


void rf_jammerIntermittent() { //@IncursioHack - https://github.com/IncursioHack - thanks @EversonPereira - rfcardputer
tft.fillScreen(TFT_BLACK);
tft.println("");
tft.println(" RF433 - Jammer Intermittent");
tft.println("");
tft.println("");
tft.setTextSize(2);
sendRF = true;
tft.println("Sending... Press ESC to stop.");
while (sendRF) {
delay(1000);
if (checkEscPress()) {
sendRF = false;
returnToMenu=true;
break;
}

for (int sequence = 1; sequence < 5000; sequence++) {
for (int duration = 1; duration <= 3; duration++) {
digitalWrite(GROVE_SDA, HIGH); // Ativa o pino
// Mantém o pino ativo por um período que aumenta com cada sequência
for (int widthsize = 1; widthsize <= (1 + sequence); widthsize++) {
delayMicroseconds(50);
}

digitalWrite(GROVE_SDA, LOW); // Desativa o pino
// Mantém o pino inativo pelo mesmo período
for (int widthsize = 1; widthsize <= (1 + sequence); widthsize++) {
delayMicroseconds(50);
}
}
}
}



}
4 changes: 3 additions & 1 deletion src/rf.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ extern PCA9554 extIo1;
const int PCA9554RSX_PIN = 4;
const int PCA9554TRX_PIN = 0;

void rf_spectrum();
void rf_spectrum();
void rf_jammerIntermittent();
void rf_jammerFull();
10 changes: 4 additions & 6 deletions src/rfid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,12 @@ void rfid_loop() {
}
}
// Checks para sair do while
if(checkEscPress()) {
tft.fillScreen(BGCOLOR);
goto Exit;
}
if (checkEscPress()) {
returnToMenu=true;
break;
}

}
Exit:
delay(300);
Serial.println();
}

Expand Down

0 comments on commit e848d45

Please sign in to comment.