Advertisement
pleasedontcode

Alloo rev_02

Nov 11th, 2023
75
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: Alloo
  13.     - Source Code compiled for: Arduino Uno
  14.     - Source Code created on: 2023-11-11 15:55:20
  15.     - Source Code generated by: SSS Shivansh
  16.  
  17. ********* Pleasedontcode.com **********/
  18. /****** DEFINITION OF LIBRARIES *****/
  19. #include <Arduino.h>
  20.  
  21. /****** SYSTEM REQUIREMENT 1 *****/
  22. /* Make 1 LED glow and 1 LED low */
  23.  
  24. /****** FUNCTION PROTOTYPES *****/
  25. void setup(void);
  26. void loop(void);
  27.  
  28. /***** DEFINITION OF DIGITAL OUTPUT PINS *****/
  29. const uint8_t GLOW_LED_PIN = 2;
  30. const uint8_t LOW_LED_PIN = 3;
  31.  
  32. void setup(void)
  33. {
  34.   // Set the LED pins as output
  35.   pinMode(GLOW_LED_PIN, OUTPUT);
  36.   pinMode(LOW_LED_PIN, OUTPUT);
  37. }
  38.  
  39. void loop(void)
  40. {
  41.   // Make GLOW_LED_PIN glow
  42.   digitalWrite(GLOW_LED_PIN, HIGH);
  43.  
  44.   // Make LOW_LED_PIN low
  45.   digitalWrite(LOW_LED_PIN, LOW);
  46.  
  47.   // Delay for 1 second
  48.   delay(1000);
  49.  
  50.   // Make GLOW_LED_PIN low
  51.   digitalWrite(GLOW_LED_PIN, LOW);
  52.  
  53.   // Make LOW_LED_PIN glow
  54.   digitalWrite(LOW_LED_PIN, HIGH);
  55.  
  56.   // Delay for 1 second
  57.   delay(1000);
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement