1#include <LcdMenu.h>
2#include <MenuScreen.h>
3#include <display/SSD1803A_I2CAdapter.h>
4#include <input/KeyboardAdapter.h>
5#include <renderer/CharacterDisplayRenderer.h>
6
7// clang-format off
8MENU_SCREEN(mainScreen, mainItems,
9 ITEM_BASIC("Start service"),
10 ITEM_BASIC("Connect to WiFi"),
11 ITEM_BASIC("Settings"),
12 ITEM_BASIC("Blink SOS"),
13 ITEM_BASIC("Blink random"));
14// clang-format on
15
16SSD1803A_I2C lcd(0x3D);
17SSD1803A_I2CAdapter lcdAdapter(&lcd);
18CharacterDisplayRenderer renderer(&lcdAdapter, 20, 4);
19LcdMenu menu(renderer);
20KeyboardAdapter keyboard(&menu, &Serial);
21
22void setup() {
23 Serial.begin(9600);
24 lcd.begin(DOGM204); // initialize DOGM204
25 // lcd.begin(WIRE1, DOGS164); // initialize DOGS164 on WIRE1
26 // lcd.begin(WIRE1, DOGS104); // initialize DOGS104 on WIRE1
27 renderer.begin();
28 menu.setScreen(mainScreen);
29}
30
31void loop() {
32 keyboard.observe();
33}