#include <SPI.h> // Include SPI library for communication
#include <Wire.h> // Include Wire library for I2C communication
#include <Adafruit_GFX.h> // Include Adafruit GFX library for graphics support
#include <Adafruit_SSD1306.h> // Include Adafruit SSD1306 library for OLED display
#define SCREEN_WIDTH 128 // Define OLED display width in pixels
#define SCREEN_HEIGHT 64 // Define OLED display height in pixels
// Declaration for SSD1306 display connected using I2C
#define OLED_RESET -1 // Reset pin (not used)
#define SCREEN_ADDRESS 0x3C // I2C address for the OLED display
// Create display object from Adafruit SSD1306 library
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
void setup()
{
Serial.begin(9600); // Initialize serial communication at 9600 baud rate
// Initialize the OLED display
if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
Serial.println(F("SSD1306 allocation failed")); // Print error message if display fails
for (;;); // Halt execution if display initialization fails
}
// Clear display buffer
display.clearDisplay();
// Display LOVELY PROFESSIONAL UNIVERSITY
display.setTextSize(1); // Set text size to 1
display.setTextColor(WHITE); // Set text color to white
display.setCursor(10, 10); // Set text position
display.println("LOVELY");
display.setCursor(10, 25); // Move cursor down
display.println("PROFESSIONAL");
display.setCursor(10, 40); // Move cursor down
display.println("UNIVERSITY");
display.display(); // Display the buffer content on the screen
}
void loop() {
// The loop function is empty as everything is handled in the setup()
}
esp:0
esp:2
esp:4
esp:5
esp:12
esp:13
esp:14
esp:15
esp:16
esp:17
esp:18
esp:19
esp:21
esp:22
esp:23
esp:25
esp:26
esp:27
esp:32
esp:33
esp:34
esp:35
esp:3V3
esp:EN
esp:VP
esp:VN
esp:GND.1
esp:D2
esp:D3
esp:CMD
esp:5V
esp:GND.2
esp:TX
esp:RX
esp:GND.3
esp:D1
esp:D0
esp:CLK
oled1:GND
oled1:VCC
oled1:SCL
oled1:SDA