#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define OLED_RESET 0
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, 0);
const unsigned char wifi_start_icon [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x0c, 0xe0, 0x20, 0x10, 0x03, 0x00, 0x18, 0x60, 0x20, 0x00, 0x07, 0x94,
0x08, 0x3e, 0x00, 0x72, 0x03, 0x7b, 0x07, 0x6b, 0x03, 0x3e, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00
};
const unsigned char wifi_connected_icon [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x1f, 0xf8, 0x30, 0x0c, 0xe3, 0xc7, 0xce, 0x73, 0x18, 0x18,
0x33, 0xcc, 0x07, 0xe0, 0x04, 0x20, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00
};
const unsigned char wifi_disconnected_icon [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x1f, 0xe0, 0x30, 0x04, 0xe3, 0x87, 0xce, 0x13, 0x18, 0x18,
0x30, 0x4c, 0x00, 0x60, 0x00, 0x20, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00
};
const unsigned char fingerprint_start_icon [] PROGMEM = {
0x00, 0x00, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x7c,
0x00, 0x00, 0x00, 0x07, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x07, 0x80, 0x00, 0x00, 0x1c,
0x3f, 0xc1, 0xc0, 0x00, 0x00, 0x38, 0xff, 0xf0, 0xc0, 0x00, 0x00, 0x31, 0xc0, 0x3c, 0xe0, 0x00,
0x00, 0x63, 0x00, 0x0c, 0x70, 0x00, 0x00, 0xe6, 0x00, 0x0e, 0x30, 0x00, 0x00, 0x46, 0x1f, 0x86,
0x30, 0x00, 0x00, 0x0e, 0x33, 0xc3, 0x38, 0x00, 0x00, 0x0c, 0x70, 0xe3, 0x38, 0x00, 0x00, 0x38,
0xe0, 0x63, 0x38, 0x00, 0x00, 0xf8, 0xc6, 0x63, 0x38, 0x00, 0x01, 0xe0, 0xc6, 0x63, 0x38, 0x00,
0x01, 0x01, 0x8c, 0x63, 0x30, 0x00, 0x00, 0x03, 0x0c, 0x63, 0x30, 0x00, 0x00, 0x1e, 0x18, 0x63,
0x30, 0x00, 0x00, 0x3c, 0x30, 0xe3, 0x30, 0x00, 0x01, 0xe0, 0xf1, 0xc3, 0x30, 0x00, 0x03, 0x81,
0xe3, 0x83, 0x38, 0x00, 0x00, 0x03, 0x87, 0x03, 0x1c, 0x00, 0x00, 0x1f, 0x0e, 0x03, 0x0e, 0x00,
0x00, 0x7c, 0x1c, 0xe3, 0x84, 0x00, 0x03, 0xe0, 0x79, 0xf1, 0xc0, 0x00, 0x01, 0x80, 0xf3, 0xb0,
0xe0, 0x00, 0x00, 0x07, 0xc7, 0x18, 0x7c, 0x00, 0x00, 0x1f, 0x0e, 0x1c, 0x1c, 0x00, 0x00, 0xfe,
0x1c, 0x0e, 0x00, 0x00, 0x00, 0xe0, 0xf0, 0x07, 0xc0, 0x00, 0x00, 0x01, 0xe1, 0xc1, 0xe0, 0x00,
0x00, 0x1f, 0x07, 0xf0, 0x78, 0x00, 0x00, 0x7e, 0x0e, 0x38, 0x18, 0x00, 0x00, 0x60, 0x78, 0x1e,
0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x80, 0x00, 0x00, 0x03, 0xc0, 0x03, 0xc0, 0x00, 0x00, 0x1f,
0x07, 0xe0, 0x40, 0x00, 0x00, 0x1c, 0x1f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x78, 0x1e, 0x00, 0x00,
0x00, 0x01, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0,
0x00, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00
};
const unsigned char fingerprint_valid_icon [] PROGMEM = {
0x07, 0x80, 0x10, 0x40, 0x2c, 0xa0, 0x00, 0x50, 0x14, 0x10, 0x2a, 0x90, 0x12, 0x10, 0x65, 0x10,
0x32, 0x00, 0x0d, 0x7c, 0x36, 0xfc, 0x18, 0xf6, 0x04, 0xee, 0x12, 0x9e, 0x0c, 0xfc, 0x02, 0x78
};
const unsigned char fingerprint_failed_icon [] PROGMEM = {
0x01, 0x00, 0x20, 0x00, 0x4a, 0x00, 0x00, 0x20, 0x8a, 0xa0, 0x00, 0x00, 0x00, 0x20, 0x20, 0x02,
0x00, 0x02, 0x00, 0x62, 0x18, 0x00, 0x04, 0x00, 0x01, 0x10, 0x48, 0x10, 0x20, 0x08, 0x00, 0x01
};
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println("SSD1306 allocation failed");
for(;;); // Don't proceed, loop forever
}
// display.display();
delay(2000); // Pause for 2 seconds
display.clearDisplay();
display.drawBitmap( 0, 0, wifi_start_icon, 16, 16, WHITE);
display.drawBitmap( 18, 0, wifi_connected_icon, 16, 16, WHITE);
display.drawBitmap( 38, 0, wifi_disconnected_icon, 16, 16, WHITE);
display.drawBitmap( 40, 17, fingerprint_start_icon, 45, 45, WHITE);
// display.drawBitmap( 74, 1, fingerprint_valid_icon, 16, 16, WHITE);
// display.drawBitmap( 92, 1, fingerprint_failed_icon, 16, 16, WHITE);
display.display();
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}