Advertisement
pleasedontcode

Arduino Pins rev_01

Apr 28th, 2024
132
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: Arduino Pins
  13.     - Source Code NOT compiled for: ESP32 DevKit V1
  14.     - Source Code created on: 2024-04-28 22:09:53
  15.  
  16. ********* Pleasedontcode.com **********/
  17.  
  18. /****** SYSTEM REQUIREMENTS *****/
  19. /****** SYSTEM REQUIREMENT 1 *****/
  20.     /* керування світлодіодами з телефону */
  21. /****** END SYSTEM REQUIREMENTS *****/
  22.  
  23. /****** DEFINITION OF LIBRARIES *****/
  24.  
  25. /****** FUNCTION PROTOTYPES *****/
  26. void setup(void);
  27. void loop(void);
  28. void updateOutputs(void); // Add function prototype for updateOutputs
  29.  
  30. /***** DEFINITION OF DIGITAL OUTPUT PINS *****/
  31. const uint8_t LED_PIN_D4 = 4;
  32. const uint8_t LED_PIN_D13 = 13;
  33. const uint8_t LED_PIN_D14 = 14;
  34. const uint8_t LED_PIN_D16 = 16;
  35.  
  36. /***** DEFINITION OF OUTPUT RAW VARIABLES *****/
  37. bool LED_PIN_D4_rawData = 0;
  38. bool LED_PIN_D13_rawData = 0;
  39. bool LED_PIN_D14_rawData = 0;
  40. bool LED_PIN_D16_rawData = 0;
  41.  
  42. /***** DEFINITION OF OUTPUT PHYSICAL VARIABLES *****/
  43. float LED_PIN_D4_phyData = 0.0;
  44. float LED_PIN_D13_phyData = 0.0;
  45. float LED_PIN_D14_phyData = 0.0;
  46. float LED_PIN_D16_phyData = 0.0;
  47.  
  48. /****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
  49. void setup(void)
  50. {
  51.     // put your setup code here, to run once:
  52.  
  53.     pinMode(LED_PIN_D4, OUTPUT);
  54.     pinMode(LED_PIN_D13, OUTPUT);
  55.     pinMode(LED_PIN_D14, OUTPUT);
  56.     pinMode(LED_PIN_D16, OUTPUT);
  57. }
  58.  
  59. void loop(void)
  60. {
  61.     // put your main code here, to run repeatedly:
  62.  
  63.     updateOutputs(); // Refresh output data
  64. }
  65.  
  66. void updateOutputs(void)
  67. {
  68.     digitalWrite(LED_PIN_D4, LED_PIN_D4_rawData);
  69.     digitalWrite(LED_PIN_D13, LED_PIN_D13_rawData);
  70.     digitalWrite(LED_PIN_D14, LED_PIN_D14_rawData);
  71.     digitalWrite(LED_PIN_D16, LED_PIN_D16_rawData);
  72. }
  73.  
  74. /* END CODE */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement