#include <Wire.h> // Include the Wire library for I2C communication
#include <Adafruit_GFX.h> // Include the Adafruit graphics library
#include <Adafruit_SSD1306.h> // Include the Adafruit OLED driver library
#define OLED_RESET 4 // Define the OLED reset pin
Adafruit_SSD1306 display(OLED_RESET); // Initialize the OLED display object
void setup() {
// Start the I2C communication
Wire.begin();
// Initialize the OLED display
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // Address 0x3C for 128x64
// Clear the OLED display buffer
display.clearDisplay();
// Set text size and color
display.setTextSize(2);
display.setTextColor(WHITE);
// Display "Hello World!" message
display.setCursor(0, 0);
display.println("Hello World!");
// Update the OLED display
display.display();
}
void loop() {
// Nothing to do here
}