/********* Pleasedontcode.com **********
Pleasedontcode thanks you for automatic code generation! Enjoy your code!
- Terms and Conditions:
You have a non-exclusive, revocable, worldwide, royalty-free license
for personal and commercial use. Attribution is optional; modifications
are allowed, but you're responsible for code maintenance. We're not
liable for any loss or damage. For full terms,
please visit pleasedontcode.com/termsandconditions.
- Project: Wi-Fi Reveal
- Source Code NOT compiled for: Arduino Uno
- Source Code created on: 2024-10-20 07:52:07
********* Pleasedontcode.com **********/
/****** SYSTEM REQUIREMENTS *****/
/****** SYSTEM REQUIREMENT 1 *****/
/* Show Wi-Fi password */
/****** END SYSTEM REQUIREMENTS *****/
/****** DEFINITION OF LIBRARIES *****/
#include //https://github.com/evert-arias/EasyButton
/****** FUNCTION PROTOTYPES *****/
void setup(void);
void loop(void);
/***** DEFINITION OF DIGITAL INPUT PINS *****/
const uint8_t Sh_PushButton_PIN_D2 = 2;
/****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
// Initialize the EasyButton object for the push button
EasyButton pushButton(Sh_PushButton_PIN_D2); // Create an instance of EasyButton for the defined pin
// Define the Wi-Fi password
const char* wifiPassword = "your_wifi_password"; // Replace with your actual Wi-Fi password
void setup(void)
{
// put your setup code here, to run once:
// Start the serial communication for debugging
Serial.begin(115200);
// Initialize the push button
pushButton.begin(); // Call the begin method to initialize the button
// Set the button's callback function for when it is pressed
pushButton.onPressed([]() {
Serial.print("Wi-Fi Password: "); // Print message when button is pressed
Serial.println(wifiPassword); // Display the Wi-Fi password
});
}
void loop(void)
{
// put your main code here, to run repeatedly:
// Read the state of the button
pushButton.read(); // Call read method to check the button state
}
/* END CODE */