This is simple Arduino code for ESP32R4 controller.
Features:
- WiFi network credentials;
- Web interface Relays toggling;
- Create classes for Relays with function ON(), OFF(), TOGGLE();
- Create classes for Buttons with function UPDATE(), GETSTATE();
- Hardware Interrupt function for Buttons activity;
Copy to Clipboard
6 Comments
Comments are closed.
This Arduino example does not seem to work. It’s creates the webserver but GPIO pins are not responding.
I’m not sure whether the classes specified for RELAY & BUTTON will work in Arduino IDE without a proper header and sour file and construct statements like:
1 #ifndef RELAY_h
2 #define RELAY_h
3
4 // the #include statement and code go here…
5
6 #endif
Looking forward to an update of the code example
Not responding for what action?
From code, from http, from buttons?
sour=source
It is not responding to the when tuning the HTTP toggle buttons. When you toggle http webserver relay 1 on pin 22 doesn’t go in a high state. Neither for any of the other webserver toggle buttons.
Sorry something went wrong with the spelling my apologies. The relays (or pins) don’t respond to input through the HTTP webserver. When you toggle relay 1 on, pin 22 doesn’t become high. It doesn’t respond to the HTTP request.
In comment is said pin #22 but this should be #25.