Advertisement
pleasedontcode

**LED Control** rev_01

Mar 7th, 2025
203
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: **LED Control**
  13.     - Source Code NOT compiled for: Arduino Uno
  14.     - Source Code created on: 2025-03-07 08:55:33
  15.  
  16. ********* Pleasedontcode.com **********/
  17.  
  18. /****** SYSTEM REQUIREMENTS *****/
  19. /****** SYSTEM REQUIREMENT 1 *****/
  20.     /* The system shall maintain a clear separation of */
  21.     /* concerns by defining setup and loop functions, */
  22.     /* enabling easier debugging and maintenance of the */
  23.     /* code structure. */
  24. /****** END SYSTEM REQUIREMENTS *****/
  25.  
  26. /* START CODE */
  27.  
  28. /****** DEFINITION OF LIBRARIES *****/
  29. #include <Arduino.h>
  30.  
  31. /****** FUNCTION PROTOTYPES *****/
  32. void setup(void);
  33. void loop(void);
  34. void updateOutputs(void); // Function prototype for updateOutputs
  35.  
  36. /***** DEFINITION OF DIGITAL OUTPUT PINS *****/
  37. const uint8_t myLED_LED_PIN_D2 = 2;
  38.  
  39. /***** DEFINITION OF OUTPUT RAW VARIABLES *****/
  40. /***** used to store raw data *****/
  41. bool myLED_LED_PIN_D2_rawData = 0;
  42.  
  43. /***** DEFINITION OF OUTPUT PHYSICAL VARIABLES *****/
  44. /***** used to store data after characteristic curve transformation *****/
  45. float myLED_LED_PIN_D2_phyData = 0.0;
  46.  
  47. void setup(void)
  48. {
  49.     // put your setup code here, to run once:
  50.     pinMode(myLED_LED_PIN_D2, OUTPUT);
  51. }
  52.  
  53. void loop(void)
  54. {
  55.     // put your main code here, to run repeatedly:
  56.     updateOutputs(); // Refresh output data
  57. }
  58.  
  59. void updateOutputs(void)
  60. {
  61.     digitalWrite(myLED_LED_PIN_D2, myLED_LED_PIN_D2_rawData);
  62. }
  63.  
  64. /* END CODE */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement