-
Notifications
You must be signed in to change notification settings - Fork 0
/
deauth_wifi.ino
53 lines (38 loc) · 948 Bytes
/
deauth_wifi.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include "ModeConfigurator.h"
#define BAUD_RATE 115200
#define WIFI_LED 2
#define SCROLLER_BTN D2
#define CONFIRM_BTN D4
ModeConfigurator mode_config;
void setup() {
Serial.begin(BAUD_RATE);
pinMode(WIFI_LED, OUTPUT);
digitalWrite(WIFI_LED, HIGH);
pinMode(SCROLLER_BTN, INPUT);
pinMode(CONFIRM_BTN, INPUT);
}
void loop() {
int scroller_button = digitalRead(SCROLLER_BTN);
int confirm_button = digitalRead(CONFIRM_BTN);
if (mode_config.get_current_mode() == "SELECT_MODE" && mode_config.get_mode_index() == 1) {
if (confirm_button == 1) {
mode_config.confirm_ap_selection();
delay(100);
return;
}
if (scroller_button == 1) {
mode_config.scroll_ap_list();
}
delay(100);
return;
}
if (confirm_button == 1) {
mode_config.confirm_mode_action();
delay(100);
return;
}
if (scroller_button == 1) {
mode_config.scroll_to_next_mode();
}
delay(100);
}