#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define down 27
#define up 14
#define ok 13
#define back 12
#define IRLED 32
int cursor = 0;
int current_proc = 0;
int battery = 100;
bool isSwitching = true;
bool rstOverride = false;
int ajDelay = 1000;
bool sourApple = false;
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 32
#define OLED_RESET -1
#define SCREEN_ADDRESS 0x3C
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
struct MENU {
char name[19];
int command;
};
//main menu
MENU mmenu[] = {
{ "clock", 1},
{ "TV B-GONE", 2},
{ "AppleJuice",3},
{ "WiFi SPAM", 4},
};
void mmenu_drawmenu() {
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
display.setCursor(2, 1);
for ( int i = 0 ; i < ( sizeof(mmenu) / sizeof(MENU) ) ; i++ ) {
display.print((cursor == i) ? "> " : " ");
display.println(mmenu[i].name);
}
display.display();
}
void mmenu_loop(){
cursor = cursor % ( sizeof(mmenu) / sizeof(MENU) );
if(digitalRead(up) == LOW){
cursor--;
digitalWrite(2, HIGH);
delay(50);
digitalWrite(2, LOW);
delay(100);
}
if (digitalRead(down) == LOW) {
cursor++;
digitalWrite(2, HIGH);
delay(50);
digitalWrite(2, LOW);
delay(100);
}
if (digitalRead(ok) == LOW) {
isSwitching = true;
current_proc = mmenu[cursor].command;
digitalWrite(2, HIGH);
delay(50);
digitalWrite(2, LOW);
delay(100);
}
mmenu_drawmenu();
}
void tvbgone_setup() {
display.clearDisplay();
display.setTextSize(2);
display.setCursor(5, 1);
display.println("TV-B-Gone");
display.setTextSize(1);
//irsend.begin();
// Hack: Set IRLED high to turn it off after setup. Otherwise it stays on (active low)
digitalWrite(IRLED, HIGH);
/*delay_ten_us(5000);
if(region == NA) {
display.print("Region:\nAmericas / Asia\n");
}
else {
display.println("Region: EMEA");
}*/
display.println("Ok: Go/Pause");
display.println("Back: Exit");
display.display();
delay(1000);
}
void tvbgone_loop()
{
if (digitalRead(ok) == LOW)
{
//delay_ten_us(40000);
while (digitalRead(ok) == LOW) {
//delay_ten_us(500);
//yield();
}
//sendAllCodes();
}
if(digitalRead(back) == LOW){
isSwitching = true;
cursor = 0;
current_proc = 0;
digitalWrite(2, HIGH);
delay(50);
digitalWrite(2, LOW);
delay(100);
}
//yield();
}
//menu tv-b-gone
MENU tvbgmenu[] = {
{ "Americas / Asia", 0},
{ "EU/MidEast/Africa", 1},
};
void tvbgmenu_drawmenu() {
display.clearDisplay();
display.setTextSize(1);
display.setCursor(2, 1);
for ( int i = 0 ; i < ( sizeof(tvbgmenu) / sizeof(MENU) ) ; i++ ) {
display.print((cursor == i) ? "> " : " ");
display.println(tvbgmenu[i].name);
}
}
void tvbgmenu_setup() {
display.clearDisplay();
display.setTextSize(2);
display.setCursor(5, 1);
display.println("TV-B-Gone");
display.setTextSize(1);
display.println("Region");
//cursor = region % 2;
rstOverride = true;
delay(1000);
tvbgmenu_drawmenu();
}
void tvbgmenu_loop() {
if (digitalRead(down) == LOW) {
cursor++;
cursor = cursor % ( sizeof(tvbgmenu) / sizeof(MENU) );
tvbgmenu_drawmenu();
delay(250);
}
if (digitalRead(ok) == LOW) {
//region = tvbgmenu[cursor].command;
//EEPROM.write(3, region);
//EEPROM.commit();
rstOverride = false;
isSwitching = true;
current_proc = 5;
}
if(digitalRead(back) == LOW){
isSwitching = true;
cursor = 0;
current_proc = 0;
digitalWrite(2, HIGH);
delay(50);
digitalWrite(2, LOW);
delay(100);
}
}
/*
void sendAllCodes()
{
bool endingEarly = false;
if (region == NA) {
num_codes = num_NAcodes;
} else {
num_codes = num_EUcodes;
}
for (i = 0 ; i < num_codes; i++)
{
if (region == NA) {
powerCode = NApowerCodes[i];
}
else {
powerCode = EUpowerCodes[i];
}
const uint8_t freq = powerCode->timer_val;
const uint8_t numpairs = powerCode->numpairs;
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(SSD1306_WHITE);
display.setCursor(5, 1);
display.println("TV-B-Gone");
display.setTextSize(1);
display.println("Front Key: Go/Pause");
const uint8_t bitcompression = powerCode->bitcompression;
code_ptr = 0;
for (uint8_t k = 0; k < numpairs; k++) {
uint16_t ti;
ti = (read_bits(bitcompression)) * 2;
#if defined(PLUS)
offtime = powerCode->times[ti]; // read word 1 - ontime
ontime = powerCode->times[ti + 1]; // read word 2 - offtime
#else
ontime = powerCode->times[ti]; // read word 1 - ontime
offtime = powerCode->times[ti + 1]; // read word 2 - offtime
#endif
M5.Lcd.setTextSize(TINY_TEXT);
M5.Lcd.printf("rti = %d Pair = %d, %d\n", ti >> 1, ontime, offtime);
rawData[k * 2] = offtime * 10;
rawData[(k * 2) + 1] = ontime * 10;
yield();
}
irsend.sendRaw(rawData, (numpairs * 2) , freq);
#if defined(PLUS)
// Hack: Set IRLED high to turn it off after each burst. Otherwise it stays on (active low)
digitalWrite(IRLED, HIGH);
#endif
yield();
bitsleft_r = 0;
delay_ten_us(20500);
if (M5.Axp.GetBtnPress()){
// duplicate code here, sadly, since this is a blocking loop
endingEarly = true;
current_proc = 1;
isSwitching = true;
rstOverride = false;
break;
}
if (digitalRead(TRIGGER) == BUTTON_PRESSED){
while (digitalRead(TRIGGER) == BUTTON_PRESSED) {
yield();
}
endingEarly = true;
quickflashLEDx(4);
break;
}
}
if (endingEarly == false)
{
delay_ten_us(MAX_WAIT_TIME); // wait 655.350ms
delay_ten_us(MAX_WAIT_TIME); // wait 655.350ms
quickflashLEDx(8);
}
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(SSD1306_WHITE);
display.setCursor(5, 1);
display.println("TV-B-Gone");
display.setTextSize(1);
display.println("Front Key: Go/Pause");
display.println("Side Key: Exit");
display.display();
}*/
//apple juice menu
MENU ajmenu[] = {
{ "AirPods", 1},
{ "SourApple Crash", 29},
{ "Transfer Number", 27},
{ "AirPods Pro", 2},
{ "AirPods Max", 3},
{ "AirPods G2", 4},
{ "AirPods G3", 5},
{ "AirPods Pro G2", 6},
{ "PowerBeats", 7},
{ "PowerBeats Pro", 8},
{ "Beats Solo Pro", 9},
{ "Beats Studio Buds", 10},
{ "Beats Flex", 11},
{ "Beats X", 12},
{ "Beats Solo 3", 13},
{ "Beats Studio 3", 14},
{ "Beats Studio Pro", 15},
{ "Beats Fit Pro", 16},
{ "Beats Studio Buds+", 17},
{ "AppleTV Setup", 18},
{ "AppleTV Pair", 19},
{ "AppleTV New User", 20},
{ "AppleTV AppleID", 21},
{ "AppleTV Audio", 22},
{ "AppleTV HomeKit", 23},
{ "AppleTV Keyboard", 24},
{ "AppleTV Network", 25},
{ "TV Color Balance", 26},
{ "Setup New Phone", 28},
{ "back", 30},
};
void aj_drawmenu() {
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
display.setCursor(2, 1);
// scrolling menu
if (cursor > 3) {
for ( int i = cursor - 3 ; i < ( sizeof(ajmenu) / sizeof(MENU) ) ; i++ ) {
display.print((cursor == i) ? "> " : " ");
display.println(ajmenu[i].name);
}
} else {
for (int i = 0 ; i < ( sizeof(ajmenu) / sizeof(MENU) ) ; i++ ) {
display.print((cursor == i) ? "> " : " ");
display.println(ajmenu[i].name);
}
}
}
void aj_setup(){
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(SSD1306_WHITE);
display.setCursor(5, 1);
display.println("AppleJuice");
delay(1000);
cursor = 0;
sourApple = false;
rstOverride = true;
aj_drawmenu();
}
void aj_loop(){
cursor = cursor % ( sizeof(ajmenu) / sizeof(MENU) );
if (digitalRead(down) == LOW) {
cursor++;
Serial.println(cursor);
aj_drawmenu();
delay(100);
}
if (digitalRead(up) == LOW && cursor >0) {
cursor--;
Serial.println(cursor);
aj_drawmenu();
delay(100);
}
if(digitalRead(back) == LOW){
isSwitching = true;
cursor = 0;
current_proc = 0;
digitalWrite(2, HIGH);
delay(50);
digitalWrite(2, LOW);
delay(100);
}
if (digitalRead(ok) == LOW) {
//deviceType = ajmenu[cursor].command;
// Also borrowed heavily from ronaldstoner / ECTO-1A esp32 AppleJuice
//uint8_t* data;
/*switch(deviceType) {
case 1:
data = Airpods;
break;
case 2:
data = AirpodsPro;
break;
case 3:
data = AirpodsMax;
break;
case 4:
data = AirpodsGen2;
break;
case 5:
data = AirpodsGen3;
break;
case 6:
data = AirpodsProGen2;
break;
case 7:
data = PowerBeats;
break;
case 8:
data = PowerBeatsPro;
break;
case 9:
data = BeatsSoloPro;
break;
case 10:
data = BeatsStudioBuds;
break;
case 11:
data = BeatsFlex;
break;
case 12:
data = BeatsX;
break;
case 13:
data = BeatsSolo3;
break;
case 14:
data = BeatsStudio3;
break;
case 15:
data = BeatsStudioPro;
break;
case 16:
data = BeatsFitPro;
break;
case 17:
data = BeatsStudioBudsPlus;
break;
case 18:
data = AppleTVSetup;
break;
case 19:
data = AppleTVPair;
break;
case 20:
data = AppleTVNewUser;
break;
case 21:
data = AppleTVAppleIDSetup;
break;
case 22:
data = AppleTVWirelessAudioSync;
break;
case 23:
data = AppleTVHomekitSetup;
break;
case 24:
data = AppleTVKeyboard;
break;
case 25:
data = AppleTVConnectingToNetwork;
break;
case 26:
data = TVColorBalance;
break;
case 27:
data = TransferNumber;
break;
case 28:
data = SetupNewPhone;
break;
case 29:
sourApple = true;
break;
case 30:
rstOverride = false;
isSwitching = true;
current_proc = 0;
break;
}*/
if (current_proc == 3 && isSwitching == false){
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(SSD1306_WHITE);
display.setCursor(5, 1);
display.println("AppleJuice");
display.setTextSize(1);
display.print("Advertising:\n");
display.print(ajmenu[cursor].name);
display.print("\n\nSide Key: Exit");
isSwitching = true;
current_proc = 4;
}
}
}
void aj_adv_setup(){
rstOverride = false;
}
void aj_adv(){
rstOverride = true;
if (sourApple){
delay(20);
//advtime = 0;
}
/*if (millis() > advtime + ajDelay){
advtime = millis();
pAdvertising->stop();
BLEAdvertisementData oAdvertisementData = BLEAdvertisementData();
if (sourApple){
uint8_t packet[17];
uint8_t size = 17;
uint8_t i = 0;
packet[i++] = size - 1; // Packet Length
packet[i++] = 0xFF; // Packet Type (Manufacturer Specific)
packet[i++] = 0x4C; // Packet Company ID (Apple, Inc.)
packet[i++] = 0x00; // ...
packet[i++] = 0x0F; // Type
packet[i++] = 0x05; // Length
packet[i++] = 0xC1; // Action Flags
const uint8_t types[] = { 0x27, 0x09, 0x02, 0x1e, 0x2b, 0x2d, 0x2f, 0x01, 0x06, 0x20, 0xc0 };
packet[i++] = types[rand() % sizeof(types)]; // Action Type
esp_fill_random(&packet[i], 3); // Authentication Tag
i += 3;
packet[i++] = 0x00; // ???
packet[i++] = 0x00; // ???
packet[i++] = 0x10; // Type ???
esp_fill_random(&packet[i], 3);
oAdvertisementData.addData(std::string((char *)packet, 17));
} else {
if (deviceType >= 18){
oAdvertisementData.addData(std::string((char*)data, sizeof(AppleTVPair)));
} else {
oAdvertisementData.addData(std::string((char*)data, sizeof(Airpods)));
}
}
pAdvertising->setAdvertisementData(oAdvertisementData);
pAdvertising->start();
digitalWrite(2, LOW);
delay(10);
digitalWrite(2, HIGH);
}*/
if (digitalRead(back) == LOW) {
current_proc = 3;
sourApple = false;
//pAdvertising->stop(); // Bug that keeps advertising in the background. Oops.
aj_drawmenu();
delay(250);
}
}
void wifispam_setup() {
/*for (int i = 0; i < 32; i++)
emptySSID[i] = ' ';
randomSeed(1);
packetSize = sizeof(beaconPacket);
if (wpa2) {
beaconPacket[34] = 0x31;
} else {
beaconPacket[34] = 0x21;
packetSize -= 26;
}
// generate random mac address
randomMac();
//change WiFi mode
WiFi.mode(WIFI_MODE_STA);
// set channel
esp_wifi_set_channel(channels[0], WIFI_SECOND_CHAN_NONE);*/
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(SSD1306_WHITE);
display.setCursor(5, 1);
display.println("WiFi Spam");
delay(1000);
display.setTextSize(1);
display.setCursor(1, 1);
display.print("WiFi Spam");
int ct = 0;
const char *str;
/* switch(spamtype) {
case 1:
for(str = funnyssids; *str; ++str) ct += *str == '\n';
display.printf(" - %d SSIDs:\n", ct);
display.print(funnyssids);
break;
case 2:
for(str = rickrollssids; *str; ++str) ct += *str == '\n';
display.printf(" - %d SSIDs:\n", ct);
display.print(rickrollssids);
break;
case 3:
// placed here for consistency. no-op since display handled in loop.
break;
}*/
display.setTextSize(1);
current_proc = 11;
}
void wifispam_loop() {
int i = 0;
int len = 0;
digitalWrite(2, LOW); //LED ON on Stick C Plus
delay(10);
digitalWrite(2, HIGH); //LED OFF on Stick C Plus
// put your main code here, to run repeatedly:
currentTime = millis();
/*if (currentTime - attackTime > 100) {
switch(spamtype) {
case 1:
len = sizeof(funnyssids);
while(i < len){
i++;
}
beaconSpam(funnyssids);
break;
case 2:
len = sizeof(rickrollssids);
while(i < len){
i++;
}
beaconSpam(rickrollssids);
break;
case 3:
char* randoms = randomSSID();
len = sizeof(randoms);
while(i < len){
i++;
}
beaconSpam(randoms);
break;
}
}*/
}
/// WIFISPAM MENU ///
MENU wsmenu[] = {
{ "Funny", 0},
{ "Rickroll", 1},
{ "Random", 2},
{ "back", 3},
};
void wsmenu_drawmenu() {
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
display.setCursor(5, 1);
for ( int i = 0 ; i < ( sizeof(wsmenu) / sizeof(MENU) ) ; i++ ) {
M5.Lcd.print((cursor == i) ? "> " : " ");
M5.Lcd.println(wsmenu[i].name);
}
}
void wsmenu_setup() {
cursor = 0;
rstOverride = true;
wsmenu_drawmenu();
delay(250);
}
void wsmenu_loop() {
cursor = cursor % ( sizeof(wsmenu) / sizeof(MENU) );
if (digitalRead(down) == LOW) {
cursor++;
wsmenu_drawmenu();
delay(250);
}
if (digitalRead(up) == LOW) {
cursor--;
wsmenu_drawmenu();
delay(250);
}
if (digitalRead(ok) == LOW) {
int option = wsmenu[cursor].command;
// Also borrowed heavily from ronaldstoner / ECTO-1A esp32 AppleJuice
//uint8_t* data;
/*switch(option) {
case 0:
spamtype = 1;
rstOverride = false;
isSwitching = true;
current_proc = 11;
break;
case 1:
spamtype = 2;
rstOverride = false;
isSwitching = true;
current_proc = 11;
break;
case 2:
spamtype = 3;
rstOverride = false;
isSwitching = true;
current_proc = 11;
break;
case 3:
rstOverride = false;
isSwitching = true;
current_proc = 1;
break;
}*/
}
}
const unsigned char capy[] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x20, 0x3f, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0xff, 0xff, 0x00, 0x80, 0x0f, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x67, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xfc, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x81, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xc0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x07, 0xff, 0xff, 0xff,
0xff, 0xfe, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff,
0xff, 0xf8, 0x06, 0x0f, 0xff, 0xff, 0x03, 0xff, 0xff, 0xfe, 0x00, 0x1f, 0xff, 0xc7, 0x9f, 0xff,
0xff, 0xf8, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x1f, 0xff, 0xa3, 0xfc, 0x78, 0xc7, 0xff,
0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0c, 0x60, 0x0f, 0xbf, 0x00, 0x3f, 0xff,
0xff, 0xff, 0x80, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xff, 0xe7, 0xfe, 0x1f, 0xff,
0xff, 0xff, 0xc0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xf3, 0xff, 0xff, 0xfe, 0x1f, 0xff,
0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xbf, 0xf0, 0xfc, 0xff, 0xfe, 0x1f, 0xff,
0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff, 0xf8, 0x1f, 0xff,
0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0x87, 0xff,
0xff, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xc1, 0xff,
0xff, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xf0, 0xff, 0xe0, 0x7f,
0xff, 0xfc, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0x83, 0xff, 0xe4, 0x1f,
0xff, 0xfc, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xff, 0x83, 0x9f, 0xcf, 0x87,
0xff, 0xf8, 0x07, 0xff, 0xff, 0xff, 0xf0, 0x3f, 0xff, 0xff, 0x8e, 0x3f, 0xe0, 0x06, 0x1f, 0xc3,
0xff, 0xf8, 0x07, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x61, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xe1,
0xff, 0xf8, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xe1,
0xff, 0xf8, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xf0, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xf0, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1,
0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xc3,
0xfc, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0x87,
0xff, 0xff, 0xfe, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x1f,
0xff, 0xff, 0xff, 0xf8, 0x00, 0x0f, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0x9f,
0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x3f, 0xff, 0xf0, 0x00, 0x58, 0x3f,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x3f, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff
};
void setup() {
Serial.begin(9600);
pinMode(down, INPUT_PULLUP);
pinMode(up, INPUT_PULLUP);
pinMode(ok, INPUT_PULLUP);
pinMode(back, INPUT_PULLUP);
pinMode(2, OUTPUT);
pinMode(IRLED, OUTPUT);
if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
Serial.println(F("SSD1306 allocation failed"));
for (;;); // Don't proceed, loop forever
}
display.clearDisplay();
// desenha o logo
display.drawBitmap(0, 0, capy, SCREEN_WIDTH, SCREEN_HEIGHT, WHITE);
display.display();
delay(1500);
}
void loop() {
if (isSwitching) {
isSwitching = false;
switch(current_proc){
case 0:
mmenu_drawmenu();
break;
case 1:
break;
case 2:
tvbgmenu_setup();
break;
case 3:
aj_setup();
break;
case 4:
aj_adv_setup();
break;
case 5:
tvbgone_setup();
break;
case 6:
wifispam_setup();
break;
case 7:
wifispam_loop();
break;
}
}
//loops
switch(current_proc){
case 0:
mmenu_loop();
break;
case 2:
tvbgmenu_loop();
break;
case 3:
aj_loop();
break;
case 4:
aj_adv();
break;
case 5:
tvbgone_loop();
break;
case 6:
wifispam_loop();
break;
case 7:
wifispam_loop();
break;
}
/*
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
display.setCursor(2, 1);
display.println(F("Ghost Hunter"));
display.setTextSize(1);
display.setCursor(95, 1);
display.print(battery);
display.print(" %");
display.setCursor(80, 1);
display.setTextColor(SSD1306_WHITE);
*/
display.display();
}