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 Loop
- - Source Code compiled for: Arduino Uno
- - Source Code created on: 2023-12-08 14:36:11
- ********* Pleasedontcode.com **********/
- /****** SYSTEM REQUIREMENTS *****/
- /****** SYSTEM REQUIREMENT 1 *****/
- /* show pictures */
- /****** END SYSTEM REQUIREMENTS *****/
- /****** DEFINITION OF LIBRARIES *****/
- #include <Arduino.h>
- #include <Wire.h>
- #include <Adafruit_SSD1306.h>
- #include <U8g2_for_Adafruit_GFX.h>
- /****** FUNCTION PROTOTYPES *****/
- void setup(void);
- void loop(void);
- /***** DEFINITION OF I2C PINS *****/
- const uint8_t tt_SSD1306OledDisplay_I2C_PIN_SDA_A4 = A4;
- const uint8_t tt_SSD1306OledDisplay_I2C_PIN_SCL_A5 = A5;
- const uint8_t tt_SSD1306OledDisplay_I2C_SLAVE_ADDRESS = 60;
- /****** DEFINITION OF LIBRARY CLASS INSTANCES*****/
- Adafruit_SSD1306 display(tt_SSD1306OledDisplay_I2C_PIN_SDA_A4, tt_SSD1306OledDisplay_I2C_PIN_SCL_A5);
- U8G2_FOR_ADAFRUIT_GFX u8g2_for_adafruit_gfx;
- void setup(void)
- {
- // Initialize the display and the U8g2_for_Adafruit_GFX library
- display.begin(SSD1306_SWITCHCAPVCC);
- u8g2_for_adafruit_gfx.begin(display);
- }
- void loop(void)
- {
- // System Requirement 1: Show pictures
- display.clearDisplay();
- // Insert code to show pictures here
- display.display();
- delay(2000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement