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

  1. Jochem 09/23/2022 at 12:25

    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

    • rcadmin 09/29/2022 at 08:01

      Not responding for what action?
      From code, from http, from buttons?

  2. Jochem 09/23/2022 at 12:27

    sour=source

  3. Jochem 10/05/2022 at 17:33

    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.

    • Jochem 10/05/2022 at 17:36

      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.

  4. Jochem 10/05/2022 at 18:20

    In comment is said pin #22 but this should be #25.

Comments are closed.

Subscribe to Newsletters

Subscribe to our newsletter to not miss any updates, instructions, projects, and news. We will send  2 emails per month.