0

Change the state of a toggle with a button ESP32
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Change the state of a toggle with a button ESP32

by DoaFx on Wed Sep 15, 2021 6:06 pm

I'm doing a school project, which turns on the lights using voice command by alexa, and we used Adafruit IO for that and it worked.
But to finish the project I'm trying to make a push button connected to an ESP32 port, modify the toggle state previously activated by voice command.
How can I do this?

The code I used is on GitHub: https://github.com/DoaFx/Adafruit-LED-Code-WIFI


(I used Google translator)

DoaFx
 
Posts: 1
Joined: Wed Sep 15, 2021 5:39 pm

Re: Change the state of a toggle with a button ESP32

by brubell on Fri Sep 17, 2021 10:11 am

But to finish the project I'm trying to make a push button connected to an ESP32 port, modify the toggle state previously activated by voice command.


You'd want the push button to write to the same feed that the voice command writes to.

We have a guide for reference on how to do this here: https://learn.adafruit.com/adafruit-io- ... ital-input

brubell
 
Posts: 1524
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.