#include <Wire.h>
#include <U8g2lib.h>
// Initialize the display
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ 22, /* data=*/ 21);
void setup() {
// Initialize the OLED display
u8g2.begin();
u8g2.clearBuffer(); // Clear the internal memory
u8g2.setFont(u8g2_font_ncenB08_tr); // Choose a suitable font
// Draw a frame and print "Hello World!"
u8g2.drawFrame(0, 0, 128, 64); // Draw a frame around the display
u8g2.drawStr(10, 30, "Hello World!"); // Print "Hello World!" at position (10, 30)
u8g2.sendBuffer(); // Transfer the buffer to the display
}
void loop() {
// No loop content needed in this example
}