Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /********* 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 Showcase
- - Source Code NOT compiled for: ESP32 DevKit V1
- - Source Code created on: 2024-05-03 03:54:30
- ********* Pleasedontcode.com **********/
- /****** SYSTEM REQUIREMENTS *****/
- /****** SYSTEM REQUIREMENT 1 *****/
- /* Writing Helo */
- /****** SYSTEM REQUIREMENT 2 *****/
- /* Analog clock show time */
- /****** END SYSTEM REQUIREMENTS *****/
- /****** DEFINITION OF LIBRARIES *****/
- #include <Wire.h>
- #include <Adafruit_SSD1306.h> //https://github.com/stblassitude/Adafruit_SSD1306_Wemos_OLED.git
- /****** 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);
- void setup(void)
- {
- // put your setup code here, to run once:
- display.begin(SSD1306_SWITCHCAPVCC, Vg_SSD1306OledDisplay_I2C_SLAVE_ADDRESS);
- display.display();
- delay(2000);
- display.clearDisplay();
- /* Writing Hello */
- display.setTextSize(2);
- display.setTextColor(WHITE);
- display.setCursor(10, 10);
- display.println("Hello");
- /* Analog clock show time */
- display.setTextSize(1);
- display.setTextColor(WHITE);
- display.setCursor(10, 30);
- display.println("Analog Clock: 12:00");
- display.display();
- delay(2000);
- display.clearDisplay();
- }
- void loop(void)
- {
- // put your main code here, to run repeatedly:
- }
- /* END CODE */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement