From 4f96161a387c3bc32ee084f14095e50ab9716b5e Mon Sep 17 00:00:00 2001 From: EnricoGuccii Date: Sun, 11 May 2025 21:42:04 +0200 Subject: add oled --- lib/oled/oled.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'lib/oled/oled.h') diff --git a/lib/oled/oled.h b/lib/oled/oled.h index 7cda336..4873285 100644 --- a/lib/oled/oled.h +++ b/lib/oled/oled.h @@ -1,18 +1,18 @@ -// #pragma once -// #include -// #include "settings.h" +#pragma once +#include +#include "settings.h" -// class OLED -// { -// public: -// OLED(); -// void clear(); -// void print(const String &text, int x, int y); -// void drawBox(); -// void setCursor(int x, int y); -// void setTextSize(int size); -// void showAnimation(); -// private: -// Adafruit_SSD1306 display; -// }; +class OLED { +public: + OLED(); + + void init(); + void showMessage(const String& msg,int size = 1 ,int x = 0, int y = 0); + void drawBitmap(const uint8_t* bitmap); + void showAnimation(const uint8_t* animation[], int frames, int delayTime); + void clear(); + +private: + Adafruit_SSD1306 display; +}; -- cgit v1.2.3