Advertisement
pleasedontcode

Wi-Fi Password rev_02

Oct 20th, 2024
88
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: Wi-Fi Password
  13.     - Source Code compiled for: Arduino Uno
  14.     - Source Code created on: 2024-10-20 07:53:52
  15.  
  16. ********* Pleasedontcode.com **********/
  17.  
  18. /****** SYSTEM REQUIREMENTS *****/
  19. /****** SYSTEM REQUIREMENT 1 *****/
  20.     /* Show Wi-Fi password */
  21. /****** END SYSTEM REQUIREMENTS *****/
  22.  
  23.  
  24. /****** DEFINITION OF LIBRARIES *****/
  25. #include <EasyButton.h> //https://github.com/evert-arias/EasyButton
  26.  
  27. /****** FUNCTION PROTOTYPES *****/
  28. void setup(void);
  29. void loop(void);
  30.  
  31. /***** DEFINITION OF DIGITAL INPUT PINS *****/
  32. const uint8_t Sh_PushButton_PIN_D2 = 2;
  33.  
  34. /****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
  35. // Initialize the EasyButton object for the push button
  36. EasyButton pushButton(Sh_PushButton_PIN_D2); // Create an instance of EasyButton for the defined pin
  37.  
  38. // Define the Wi-Fi password
  39. const char* wifiPassword = "your_wifi_password"; // Replace with your actual Wi-Fi password
  40.  
  41. void setup(void)
  42. {
  43.     // put your setup code here, to run once:
  44.    
  45.     // Start the serial communication for debugging
  46.     Serial.begin(115200);
  47.  
  48.     // Initialize the push button
  49.     pushButton.begin(); // Call the begin method to initialize the button
  50.  
  51.     // Set the button's callback function for when it is pressed
  52.     pushButton.onPressed([]() {
  53.         Serial.print("Wi-Fi Password: "); // Print message when button is pressed
  54.         Serial.println(wifiPassword); // Display the Wi-Fi password
  55.     });
  56. }
  57.  
  58. void loop(void)
  59. {
  60.     // put your main code here, to run repeatedly:
  61.    
  62.     // Read the state of the button
  63.     pushButton.read(); // Call read method to check the button state
  64. }
  65.  
  66. /* END CODE */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement