application: add OLED display setup

This commit is contained in:
King Kévin 2020-12-12 14:12:21 +01:00
parent 90ead50dff
commit b9ed5ca759
1 changed files with 11 additions and 0 deletions

View File

@ -34,6 +34,7 @@
#include "menu.h" // menu utilities
#include "sensor_sr04.h" // range measurement utilities
#include "sensor_ds18b20.h" // 1-Wire temperature sensor utilities
#include "oled_text.h" // OLED display utilities
/** watchdog period in ms */
#define WATCHDOG_PERIOD 10000
@ -445,6 +446,16 @@ void main(void)
puts("KO\n");
}
puts("setup SSD1306 OLED display: ");
if (oled_text_setup()) {
oled_text_clear();
oled_text_line("YEAST RAISER", 0);
oled_text_update();
puts("OK\n");
} else {
puts("KO\n");
}
// setup terminal
terminal_prefix = ""; // set default prefix
terminal_process = &process_command; // set central function to process commands