Closed Tharos88 closed 2 months ago
Unfortunately, your question is very general and can therefore only be answered in general terms.
Write a function that periodically checks the status of the button.
If the status changes and the current status is “pressed”, switch the strip on or off (depending on the status of the RGB strip). At the same time, send an onPowerState
event to the SinricPro server to inform it of the changed status.
See the handleButtonPress
function in the example Switch.ino
as well as the control of an LED strip in the examples Light_FastLED_WS2812.ino and RGB_LED_Stripe_5050.ino
Thanks for your quick response @sivar2311. I think it will be enough for me to implement the button. Thank you so much.
Hi. I'd like know how can I get to add a touch button to turn on and turn off the RGB strip lights and what the code would be like in Arduino. Thank you.