0% found this document useful (0 votes)
6 views1 page

Arduino SSD1306 Display Setup Guide

This document contains an Arduino sketch for initializing and displaying text on an SSD1306 OLED display. It sets up the display with specific dimensions, clears it, and prints the text 'AADHITH' in a defined size and color. The setup function also includes error handling for display initialization and a serial output confirmation message.

Uploaded by

shinod900
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Arduino SSD1306 Display Setup Guide

This document contains an Arduino sketch for initializing and displaying text on an SSD1306 OLED display. It sets up the display with specific dimensions, clears it, and prints the text 'AADHITH' in a defined size and color. The setup function also includes error handling for display initialization and a serial output confirmation message.

Uploaded by

shinod900
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

#include <Wire.

h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128


#define SCREEN_HEIGHT 64

// Create display object


Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

void setup() {
[Link](9600);

// Initialize display
if(![Link](SSD1306_SWITCHCAPVCC, 0x3C)) {
[Link](F("SSD1306 allocation failed"));
for(;;); // Infinite loop if display fails
}

// Clear the display


[Link]();

// Set text properties


[Link](2);
[Link](SSD1306_WHITE);
[Link](20, 24);

// Display text
[Link]("AADHITH");

// Show on screen
[Link]();

[Link](F("Display initialized successfully!"));


}

void loop() {

You might also like