Aircoookie / Espalexa

Alexa voice control for ESP8266/ESP32 (including brightness and color!)
MIT License
545 stars 137 forks source link

PULSE BUTTON #148

Open MullerEsposito opened 3 years ago

MullerEsposito commented 3 years ago

Hello, I'm trying create a pulse button on Alexa. I already got it for half. In my code it looks like this:

void pulsePortao(uint8_t brightness) { digitalWrite(PIN_PORTAO, HIGH); delay(1000); digitalWrite(PIN_PORTAO, LOW); }

It's working, but on the Alexa interface the button not return to state off. How can I do to control the state of device on interface of Alexa?

alka79 commented 3 years ago

I am not sure to fully understand your question. If it is related to the state of a device, I would use geState() rather than brightness. You can use setState() to change the state.