#include #include "PowerManagement.h" #include "Kernel.h" #include "Colours.h" int count = 0; int test_func(unsigned int signal) { M5.Lcd.fillScreen(TFT_DARKGREY); M5.Lcd.setCursor(0, 0); if (signal & SIGNAL_START) { M5.Lcd.setRotation(3); M5.Lcd.print("Initializing..."); } if (signal & SIGNAL_STOP) { M5.Lcd.print("Stopping"); return 255; } if (signal & SIGNAL_TICK) { count++; M5.Lcd.print("Ran: "); M5.Lcd.print(String(count)); M5.Lcd.print(" times"); } return 0; } void setup() { M5.begin(); Kernel_setup(); PowerManagement_setup(); Kernel_start(&test_func, 1000); } void loop() { Kernel_tick(); PowerManagement_tick(); }