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: Malw
- - Source Code compiled for: Arduino Pro Mini 3.3V
- - Source Code created on: 2023-10-21 10:14:02
- - Source Code generated by: Felice
- ********* Pleasedontcode.com **********/
- /****** DEFINITION OF LIBRARIES *****/
- #include <Arduino.h>
- #include <Wire.h>
- #include <Adafruit_GFX.h>
- #include <Adafruit_SSD1306.h>
- /****** SYSTEM REQUIREMENT 1 *****/
- /*
- Add description of system requirement 1 here
- */
- /****** FUNCTION PROTOTYPES *****/
- void setup(void);
- void loop(void);
- /***** DEFINITION OF I2C PINS *****/
- const uint8_t Svsg_SSD1306OledDisplay_I2C_PIN_SDA_A4 = A4; // Define the I2C SDA pin
- const uint8_t Svsg_SSD1306OledDisplay_I2C_PIN_SCL_A5 = A5; // Define the I2C SCL pin
- const uint8_t Svsg_SSD1306OledDisplay_I2C_SLAVE_ADDRESS = 0x3C; // Define the I2C slave address
- /***** DEFINITION OF OLED DISPLAY *****/
- Adafruit_SSD1306 display(128, 64, &Wire, Svsg_SSD1306OledDisplay_I2C_SLAVE_ADDRESS);
- void setup(void)
- {
- // Initialize I2C communication
- Wire.begin();
- // Initialize OLED display
- display.begin(SSD1306_SWITCHCAPVCC);
- // Clear the display buffer
- display.clearDisplay();
- // Set the text color to white
- display.setTextColor(SSD1306_WHITE);
- // Set the text size to 1
- display.setTextSize(1);
- // Set the cursor position to (0, 0)
- display.setCursor(0, 0);
- // Print a message on the display
- display.println("Hello, World!");
- // Display the content of the buffer
- display.display();
- }
- void loop(void)
- {
- // Add your main code here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement