24 lines
580 B
C++
24 lines
580 B
C++
#pragma once
|
|
#include <Adafruit_SSD1306.h>
|
|
|
|
#define SCREEN_WIDTH 128
|
|
#define SCREEN_HEIGHT 64
|
|
|
|
#define OLED_RESET -1 // Not used
|
|
#define SCREEN_ADDRESS 0x3C // < from Datasheet, maybe 0x3c, maybe 0x3d
|
|
|
|
#define I2C_SDA_PIN 6 // D4 (GPIO 06) on XIAO_ESP32_C3
|
|
#define I2C_SCL_PIN 7 // D5 (GPIO 07) on XIAO_ESP32_C3
|
|
|
|
namespace Screen {
|
|
|
|
extern Adafruit_SSD1306 display;
|
|
|
|
// attempt to start up screen; will lock program if fails
|
|
void setup_screen();
|
|
|
|
// example code to draw to screen (test working)
|
|
void test_fillrect();
|
|
|
|
void wire_search(uint8_t loops);
|
|
} // namespace Screen
|