#include <Wire.h>
#include <U8g2lib.h>
// 🧩 I2C Pin Configuration for ESP32-S3
#define I2C_SDA 16
#define I2C_SCL 17
// 📺 OLED 128x64 I2C Display Setup (no reset pin needed)
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(
U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ I2C_SCL, /* data=*/ I2C_SDA);
void setup() {
u8g2.begin();
}
void loop() {
u8g2.clearBuffer();
// ✍️ Set a Unicode-compatible font that supports Devanagari (Marathi)
u8g2.setFont(u8g2_font_unifont_te); // ✅ Available in most U8g2 versions
u8g2.setFontDirection(0);
// 🌸 Marathi poetic lines
u8g2.drawUTF8(0, 20, "माझं स्वप्न जगणं आहे"); // "Living my dream"
u8g2.drawUTF8(0, 36, "तू आभाळातला रंग"); // "You are the color of the sky"
u8g2.drawUTF8(0, 52, "शब्दांत सांडलेलं आकाश"); // "The sky spilled in words"
u8g2.sendBuffer(); // Push to display
delay(4000); // Pause before refresh
}
Loading
esp32-s3-devkitc-1
esp32-s3-devkitc-1