Advertisement
pleasedontcode

Irsensor rev_01

Dec 6th, 2023
73
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: Irsensor
  13.     - Source Code compiled for: Arduino Uno
  14.     - Source Code created on: 2023-12-06 13:39:31
  15.     - Source Code generated by: Vedant
  16.  
  17. ********* Pleasedontcode.com **********/
  18.  
  19. /****** SYSTEM REQUIREMENTS *****/
  20. /****** SYSTEM REQUIREMENT 1 *****/
  21.     /* Create an animation of 3d cude on the display */
  22. /****** SYSTEM REQUIREMENT 2 *****/
  23.     /* Create an animation of 3d cude on the display */
  24. /****** END SYSTEM REQUIREMENTS *****/
  25.  
  26. /****** DEFINITION OF LIBRARIES *****/
  27. #include <Arduino.h>
  28. #include <Wire.h>
  29. #include <Adafruit_SSD1306.h>
  30. #include <U8g2_for_Adafruit_GFX.h>
  31.  
  32. /****** FUNCTION PROTOTYPES *****/
  33. void setup(void);
  34. void loop(void);
  35.  
  36. /***** DEFINITION OF I2C PINS *****/
  37. const uint8_t Irsensor_SSD1306OledDisplay_I2C_PIN_SDA = A4;
  38. const uint8_t Irsensor_SSD1306OledDisplay_I2C_PIN_SCL = A5;
  39. const uint8_t Irsensor_SSD1306OledDisplay_I2C_SLAVE_ADDRESS = 0x3C;
  40.  
  41. /****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
  42. Adafruit_SSD1306 display(Irsensor_SSD1306OledDisplay_I2C_SLAVE_ADDRESS);
  43. U8G2_FOR_ADAFRUIT_GFX u8g2_for_adafruit_gfx;
  44.  
  45. void setup(void)
  46. {
  47.   // put your setup code here, to run once:
  48.   display.begin(SSD1306_SWITCHCAPVCC, Irsensor_SSD1306OledDisplay_I2C_PIN_SDA, Irsensor_SSD1306OledDisplay_I2C_PIN_SCL);
  49.   u8g2_for_adafruit_gfx.begin(display);
  50.  
  51.   display.display();
  52.   delay(2000);
  53.   display.clearDisplay();
  54. }
  55.  
  56. void loop(void)
  57. {
  58.   // put your main code here, to run repeatedly:
  59.  
  60.   // Animation of a 3D cube
  61.   // System Requirement 1
  62.   // TODO: Add code for 3D cube animation
  63.  
  64.   // Animation of a 3D cube
  65.   // System Requirement 2
  66.   // TODO: Add code for 3D cube animation
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement