Advertisement
pleasedontcode

Malw rev_01

Oct 21st, 2023
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /********* Pleasedontcode.com **********
  2.  
  3.     Pleasedontcode thanks you for automatic code generation! Enjoy your code!
  4.  
  5.     - Terms and Conditions:
  6.     You have a non-exclusive, revocable, worldwide, royalty-free license
  7.     for personal and commercial use. Attribution is optional; modifications
  8.     are allowed, but you're responsible for code maintenance. We're not
  9.     liable for any loss or damage. For full terms,
  10.     please visit pleasedontcode.com/termsandconditions.
  11.  
  12.     - Project: Malw
  13.     - Source Code compiled for: Arduino Pro Mini 3.3V
  14.     - Source Code created on: 2023-10-21 10:14:02
  15.     - Source Code generated by: Felice
  16.  
  17. ********* Pleasedontcode.com **********/
  18. /****** DEFINITION OF LIBRARIES *****/
  19. #include <Arduino.h>
  20. #include <Wire.h>
  21. #include <Adafruit_GFX.h>
  22. #include <Adafruit_SSD1306.h>
  23.  
  24. /****** SYSTEM REQUIREMENT 1 *****/
  25. /*
  26.    Add description of system requirement 1 here
  27. */
  28.  
  29. /****** FUNCTION PROTOTYPES *****/
  30. void setup(void);
  31. void loop(void);
  32.  
  33. /***** DEFINITION OF I2C PINS *****/
  34. const uint8_t Svsg_SSD1306OledDisplay_I2C_PIN_SDA_A4 = A4; // Define the I2C SDA pin
  35. const uint8_t Svsg_SSD1306OledDisplay_I2C_PIN_SCL_A5 = A5; // Define the I2C SCL pin
  36. const uint8_t Svsg_SSD1306OledDisplay_I2C_SLAVE_ADDRESS = 0x3C; // Define the I2C slave address
  37.  
  38. /***** DEFINITION OF OLED DISPLAY *****/
  39. Adafruit_SSD1306 display(128, 64, &Wire, Svsg_SSD1306OledDisplay_I2C_SLAVE_ADDRESS);
  40.  
  41. void setup(void)
  42. {
  43.   // Initialize I2C communication
  44.   Wire.begin();
  45.  
  46.   // Initialize OLED display
  47.   display.begin(SSD1306_SWITCHCAPVCC);
  48.  
  49.   // Clear the display buffer
  50.   display.clearDisplay();
  51.  
  52.   // Set the text color to white
  53.   display.setTextColor(SSD1306_WHITE);
  54.  
  55.   // Set the text size to 1
  56.   display.setTextSize(1);
  57.  
  58.   // Set the cursor position to (0, 0)
  59.   display.setCursor(0, 0);
  60.  
  61.   // Print a message on the display
  62.   display.println("Hello, World!");
  63.  
  64.   // Display the content of the buffer
  65.   display.display();
  66. }
  67.  
  68. void loop(void)
  69. {
  70.   // Add your main code here
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement