Advertisement
pleasedontcode

T rev_01

Oct 22nd, 2023
84
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: T
  13.     - Source Code compiled for: Arduino Nano
  14.     - Source Code created on: 2023-10-22 05:45:32
  15.     - Source Code generated by: Muhammad Baqir
  16.  
  17. ********* Pleasedontcode.com **********/
  18. /****** DEFINITION OF LIBRARIES *****/
  19. #include <Arduino.h>
  20.  
  21. /****** SYSTEM REQUIREMENT 1: Blink LED on pin D2 *****/
  22. const uint8_t LED_PIN_D2 = 2;
  23.  
  24. /****** SYSTEM REQUIREMENT 2: Blink LED on pin D3 *****/
  25. const uint8_t LED_PIN_D3 = 3;
  26.  
  27. /****** FUNCTION PROTOTYPES *****/
  28. void setup(void);
  29. void loop(void);
  30.  
  31. void setup(void)
  32. {
  33.     // Set LED pins as outputs
  34.     pinMode(LED_PIN_D2, OUTPUT);
  35.     pinMode(LED_PIN_D3, OUTPUT);
  36. }
  37.  
  38. void loop(void)
  39. {
  40.     // Blink LED on pin D2
  41.     digitalWrite(LED_PIN_D2, HIGH); // Turn on LED
  42.     delay(500); // Wait for 500 milliseconds
  43.     digitalWrite(LED_PIN_D2, LOW); // Turn off LED
  44.     delay(500); // Wait for 500 milliseconds
  45.  
  46.     // Blink LED on pin D3
  47.     digitalWrite(LED_PIN_D3, HIGH); // Turn on LED
  48.     delay(500); // Wait for 500 milliseconds
  49.     digitalWrite(LED_PIN_D3, LOW); // Turn off LED
  50.     delay(500); // Wait for 500 milliseconds
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement