Advertisement
pleasedontcode

"Blink Matrix" rev_01

Apr 2nd, 2024
104
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: "Blink Matrix"
  13.     - Source Code compiled for: ESP32 DevKit V1
  14.     - Source Code created on: 2024-04-03 04:51:52
  15.  
  16. ********* Pleasedontcode.com **********/
  17.  
  18. /****** SYSTEM REQUIREMENTS *****/
  19. /****** SYSTEM REQUIREMENT 1 *****/
  20.     /* Generate a code which will blink 1 led in 3×3 led */
  21.     /* matrix */
  22. /****** END SYSTEM REQUIREMENTS *****/
  23.  
  24. /****** DEFINITION OF LIBRARIES *****/
  25.  
  26. /****** SYSTEM REQUIREMENTS *****/
  27. /****** SYSTEM REQUIREMENT 1 *****/
  28.     /* Generate a code which will blink 1 led in 3x3 led */
  29.     /* matrix */
  30. /****** END SYSTEM REQUIREMENTS *****/
  31.  
  32. /****** FUNCTION PROTOTYPES *****/
  33. void setup(void);
  34. void loop(void);
  35. void updateOutputs();
  36.  
  37. /***** DEFINITION OF DIGITAL OUTPUT PINS *****/
  38. const uint8_t Matrix_LED_PIN_D4 = 4;
  39.  
  40. /***** DEFINITION OF OUTPUT RAW VARIABLES *****/
  41. /***** used to store raw data *****/
  42. bool Matrix_LED_PIN_D4_rawData = 0;
  43.  
  44. void setup(void)
  45. {
  46.   // put your setup code here, to run once:
  47.   pinMode(Matrix_LED_PIN_D4, OUTPUT);
  48. }
  49.  
  50. void loop(void)
  51. {
  52.   // put your main code here, to run repeatedly:
  53.   updateOutputs(); // Refresh output data
  54.   delay(1000); // Delay for 1 second
  55. }
  56.  
  57. void updateOutputs()
  58. {
  59.   static bool state = false;
  60.   digitalWrite(Matrix_LED_PIN_D4, state);
  61.   state = !state;
  62. }
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement