// vyžaduje instalaci knihoven Adafruit SSD1306 a Adafruit GFX Library #include #include #include #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 32 #define OLED_RESET -1 #define SCREEN_ADDRESS 0x3C Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); void setup() { Wire.begin(5, 4); // SDA, SCL – přizpůsob svým pinům if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) { Serial.println(F("OLED nenalezen")); while (true); } display.clearDisplay(); display.setTextSize(1); display.setTextColor(SSD1306_WHITE); display.setCursor(0, 0); display.println("Tenhle display je "); display.println("mega cool!"); display.display(); } void loop() { // nic }