Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button Handler #655

Merged
merged 4 commits into from
Jun 18, 2023
Merged

Button Handler #655

merged 4 commits into from
Jun 18, 2023

Conversation

mairas
Copy link
Collaborator

@mairas mairas commented Jun 15, 2023

This PR implements a button handler for SensESP. The BOOT button on GPIO 0 detects the following events:

  • Short press (less than 1 second): Restart the device
  • Long press (more than 1 second): Reset the network settings
  • Very long press (more than 5 seconds): Reset the device to factory settings

@JohnySeven
Copy link
Contributor

Nice, that is something I was thinking about today, I've replaced my RPI 3A+ with CM4 board and changed WiFi SSID. So, I had to erase flash & upload code to get my boat engine SH-ESP working with new SSID!

Also, it would be nice if LED flash interval would change to indicate activation of network reset or factory settings restore. This is how Mikrotik indicates the board will restore factory settings. It's very convenient for the user.

@mairas
Copy link
Collaborator Author

mairas commented Jun 18, 2023

Thanks for the comment. I created a new issue for that.

@mairas mairas merged commit 6e9d775 into main Jun 18, 2023
@mairas mairas deleted the button_ui branch June 18, 2023 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants