pleasedontcode

LED Control rev_02

Apr 29th, 2024
71
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 Mega
  14.     - Source Code created on: 2024-04-29 12:31:10
  15.  
  16. ********* Pleasedontcode.com **********/
  17.  
  18. /****** SYSTEM REQUIREMENTS *****/
  19. /****** SYSTEM REQUIREMENT 1 *****/
  20.     /* turn on for 30 sec */
  21. /****** SYSTEM REQUIREMENT 2 *****/
  22.     /* turn on for 30 sec */
  23. /****** END SYSTEM REQUIREMENTS *****/
  24.  
  25. /****** DEFINITION OF LIBRARIES *****/
  26.  
  27. /****** FUNCTION PROTOTYPES *****/
  28. void setup(void);
  29. void loop(void);
  30. void updateOutputs(void);
  31.  
  32. /***** DEFINITION OF DIGITAL OUTPUT PINS *****/
  33. const uint8_t gggg_LED_PIN_D2 = 2;
  34.  
  35. /***** DEFINITION OF OUTPUT RAW VARIABLES *****/
  36. bool gggg_LED_PIN_D2_rawData = 0;
  37.  
  38. /***** DEFINITION OF OUTPUT PHYSICAL VARIABLES *****/
  39. float gggg_LED_PIN_D2_phyData = 0.0;
  40.  
  41. void setup(void)
  42. {
  43.     // put your setup code here, to run once:
  44.     pinMode(gggg_LED_PIN_D2, OUTPUT);
  45. }
  46.  
  47. void loop(void)
  48. {
  49.     // put your main code here, to run repeatedly:
  50.     updateOutputs(); // Refresh output data
  51. }
  52.  
  53. void updateOutputs()
  54. {
  55.     // System Requirement 1: Turn on for 30 seconds
  56.     gggg_LED_PIN_D2_rawData = 1;
  57.     delay(30000); // 30 seconds delay
  58.     digitalWrite(gggg_LED_PIN_D2, gggg_LED_PIN_D2_rawData);
  59.  
  60.     // System Requirement 2: Turn off for 30 seconds
  61.     gggg_LED_PIN_D2_rawData = 0;
  62.     delay(30000); // 30 seconds delay
  63.     digitalWrite(gggg_LED_PIN_D2, gggg_LED_PIN_D2_rawData);
  64. }
  65.  
  66. /* END CODE */
Add Comment
Please, Sign In to add comment