/********* Pleasedontcode.com **********
Pleasedontcode thanks you for automatic code generation! Enjoy your code!
- Terms and Conditions:
You have a non-exclusive, revocable, worldwide, royalty-free license
for personal and commercial use. Attribution is optional; modifications
are allowed, but you're responsible for code maintenance. We're not
liable for any loss or damage. For full terms,
please visit pleasedontcode.com/termsandconditions.
- Project: OLED Display
- Source Code NOT compiled for: ESP32 DevKit V1
- Source Code created on: 2024-05-03 03:51:55
********* Pleasedontcode.com **********/
/****** SYSTEM REQUIREMENTS *****/
/****** SYSTEM REQUIREMENT 1 *****/
/* Writing Helo */
/****** END SYSTEM REQUIREMENTS *****/
/****** DEFINITION OF LIBRARIES *****/
#include
#include // Include Adafruit SSD1306 Library
#include // Include Adafruit GFX Library for graphics
/****** FUNCTION PROTOTYPES *****/
void setup(void);
void loop(void);
/***** DEFINITION OF I2C PINS *****/
const uint8_t Vg_SSD1306OledDisplay_I2C_PIN_SDA_D21 = 21;
const uint8_t Vg_SSD1306OledDisplay_I2C_PIN_SCL_D22 = 22;
const uint8_t Vg_SSD1306OledDisplay_I2C_SLAVE_ADDRESS = 60;
/****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
Adafruit_SSD1306 display(Vg_SSD1306OledDisplay_I2C_PIN_SDA_D21, Vg_SSD1306OledDisplay_I2C_PIN_SCL_D22); // Initialize the Adafruit_SSD1306 object with I2C pins
void setup(void)
{
display.begin(SSD1306_SWITCHCAPVCC, Vg_SSD1306OledDisplay_I2C_SLAVE_ADDRESS); // Initialize the OLED display
display.display(); // Update the display
delay(2000);
display.clearDisplay();
display.setTextSize(1); // Set text size
display.setTextColor(WHITE); // Set text color
display.setCursor(0, 20); // Set cursor position
display.println("Helo"); // Print "Helo" on the display
display.display(); // Update the display
delay(2000);
}
void loop(void)
{
// Main code - runs repeatedly
}
/* END CODE */