Advertisement
pleasedontcode

LED Control rev_01

Mar 18th, 2024
58
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 compiled for: Arduino Uno
  14.     - Source Code created on: 2024-03-18 14:32:13
  15.  
  16. ********* Pleasedontcode.com **********/
  17.  
  18. /****** SYSTEM REQUIREMENTS *****/
  19. /****** SYSTEM REQUIREMENT 1 *****/
  20.     /* As a user, I want to be able to control the LED */
  21.     /* connected to pin D2 of the Arduino board, so that */
  22.     /* I can turn it on and off remotely. */
  23. /****** SYSTEM REQUIREMENT 2 *****/
  24.     /* As a user, I want to be able to control the LED */
  25.     /* connected to pin D2 of the Arduino board, so that */
  26.     /* I can turn it on and off remotely. */
  27. /****** END SYSTEM REQUIREMENTS *****/
  28.  
  29. /****** DEFINITION OF LIBRARIES *****/
  30. #include <Arduino.h>
  31.  
  32. /****** FUNCTION PROTOTYPES *****/
  33. void setup(void);
  34. void loop(void);
  35. void updateOutputs(void);
  36.  
  37. /***** DEFINITION OF DIGITAL OUTPUT PINS *****/
  38. const uint8_t led_LED_PIN_D2 = 2;
  39.  
  40. /***** DEFINITION OF OUTPUT RAW VARIABLES *****/
  41. bool led_LED_PIN_D2_rawData = false;
  42.  
  43. void setup(void)
  44. {
  45.   // Set the LED pin as OUTPUT
  46.   pinMode(led_LED_PIN_D2, OUTPUT);
  47. }
  48.  
  49. void loop(void)
  50. {
  51.   // put your main code here, to run repeatedly:
  52.  
  53.   // Update outputs based on the raw data
  54.   updateOutputs();
  55. }
  56.  
  57. void updateOutputs(void)
  58. {
  59.   // Set the LED pin state based on the raw data
  60.   digitalWrite(led_LED_PIN_D2, led_LED_PIN_D2_rawData);
  61. }
  62.  
  63. /* END CODE */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement