Advertisement
pleasedontcode

logoslider rev_01

Oct 25th, 2023
48
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: logoslider
  13.     - Source Code compiled for: Arduino Uno
  14.     - Source Code created on: 2023-10-25 08:15:06
  15.     - Source Code generated by: Apparel
  16.  
  17. ********* Pleasedontcode.com **********/
  18. /****** DEFINITION OF LIBRARIES *****/
  19. #include <Arduino.h>
  20. #include <EasyButton.h>
  21.  
  22. // Define digital input pins
  23. const uint8_t html_PushButton_PIN_D2 = 2;
  24.  
  25. // Create an instance of the EasyButton class
  26. EasyButton html_PushButton(html_PushButton_PIN_D2);
  27.  
  28. void setup() {
  29.   // Initialize the push button
  30.   html_PushButton.begin();
  31.  
  32.   // Attach a callback function to handle button press event
  33.   html_PushButton.onPressed(buttonPressed);
  34. }
  35.  
  36. void loop() {
  37.   // Update the button state
  38.   html_PushButton.read();
  39. }
  40.  
  41. void buttonPressed() {
  42.   // Handle button press event
  43.   // Add your code here
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement