Advertisement
pleasedontcode

Ir_sensor rev_01

Dec 2nd, 2023
92
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: Ir_sensor
  13.     - Source Code compiled for: Arduino Uno
  14.     - Source Code created on: 2023-12-03 00:09:43
  15.     - Source Code generated by: zasoor
  16.  
  17. ********* Pleasedontcode.com **********/
  18. /****** DEFINITION OF LIBRARIES *****/
  19. #include <Arduino.h>
  20.  
  21. /****** SYSTEM REQUIREMENT 1 *****/
  22. /* Turn on and off */
  23.  
  24. /****** FUNCTION PROTOTYPES *****/
  25. void setup(void);
  26. void loop(void);
  27.  
  28. /***** DEFINITION OF DIGITAL OUTPUT PINS *****/
  29. const uint8_t LED_PIN = 2; // Define the pin number for the LED
  30.  
  31. void setup(void)
  32. {
  33.   // put your setup code here, to run once:
  34.   pinMode(LED_PIN, OUTPUT); // Set the LED pin as output
  35. }
  36.  
  37. void loop(void)
  38. {
  39.   // put your main code here, to run repeatedly:
  40.  
  41.   // Turn on the LED
  42.   digitalWrite(LED_PIN, HIGH);
  43.  
  44.   // Delay for 1 second
  45.   delay(1000);
  46.  
  47.   // Turn off the LED
  48.   digitalWrite(LED_PIN, LOW);
  49.  
  50.   // Delay for 1 second
  51.   delay(1000);
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement