Display control code

This commit is contained in:
2026-02-07 01:38:05 -05:00
parent 2e9004ee34
commit 52ff24e649
21 changed files with 797 additions and 86 deletions

View File

@@ -0,0 +1,23 @@
#include <cstdint>
#include <string>
#ifndef OLED_H
#define OLED_H
class Oled {
public:
Oled(uint8_t sda_pin, uint8_t scl_pin) {
init(sda_pin, scl_pin);
};
void clear_display();
void set_contrast(uint8_t contrast);
void display_text(const std::string& text);
private:
void init(uint8_t sda_pin, uint8_t scl_pin);
void rotate8x8(uint8_t in[8], uint8_t out[8]);
};
#endif // OLED_H