38 lines
684 B
C++
38 lines
684 B
C++
#include "SoftwareSerial.h"
|
|
#include "U8glib.h"
|
|
|
|
const byte bt_tx_connected_to = 11;
|
|
const byte bt_rx_connected_to = 12;
|
|
|
|
String pass = "0721";
|
|
String recovery_pass
|
|
|
|
SoftwareSerial bt_serial(bt_tx_connected_to, bt_rx_connected_to);
|
|
U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);
|
|
|
|
void setup() {
|
|
Serial.begin(9600);
|
|
bt_serial.begin(9600);
|
|
u8g.setFont(u8g_font_courR08);
|
|
}
|
|
|
|
void loop() {
|
|
draw_locked();
|
|
delay(1000);
|
|
draw_unlocked();
|
|
delay(1000);
|
|
}
|
|
|
|
void draw_unlocked() {
|
|
u8g.firstPage();
|
|
do {
|
|
u8g.drawStr(0, 16, "Unlocked");
|
|
} while (u8g.nextPage());
|
|
}
|
|
|
|
void draw_locked() {
|
|
u8g.firstPage();
|
|
do {
|
|
u8g.drawStr(0, 8, "Locked");
|
|
} while (u8g.nextPage());
|
|
} |