Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino device (esp8266) Add events to PushButton #132

Open
rarno opened this issue Feb 15, 2021 · 4 comments
Open

Arduino device (esp8266) Add events to PushButton #132

rarno opened this issue Feb 15, 2021 · 4 comments

Comments

@rarno
Copy link

rarno commented Feb 15, 2021

Hello, please excuse my bad English. I also need help with "PressedEvent". Unfortunately, in the examples "Update LEDLamp example to use actions & events. (# 101)" I cannot find any instructions on "Events". I cannot correctly adapt the "Event" "Overheated" in the example "LEDLamp" to a "pressedEvent". I'm trying a "flip-flop implementation" like in "# 694". Do you have an example for me to learn more?

@kgiori
Copy link

kgiori commented Feb 15, 2021

Since you're using an ESP8266, you might want to try the MicroBlocks WebThings library -- easier to use than the Arduino library and the pressed events work fine. There are examples in the MicroBlocks IDE that work "right out of the box", including a pushbutton example. See: http://microblocks.fun/ and http://microblocks.fun/iot.html

If you need any help, I'm on the chat channel and forum too.

@rarno
Copy link
Author

rarno commented Feb 15, 2021

Thank you for your message. I have prepared various settings such as network address etc. and its running.
I also have other sensors and actuators in the same device (ESP).
That's why I want to keep using the Arduino IDE

@mrstegeman mrstegeman transferred this issue from WebThingsIO/gateway Feb 15, 2021
@mrstegeman
Copy link
Contributor

Why can you not adapt the LEDLamp example?

@rarno
Copy link
Author

rarno commented Feb 16, 2021

My knowledge is not enough.
Pushed button is pressed, "Pressed Event" comes, information appears on the monitor, an LED can be switched on with it. The next time I press the button, nothing happens. A new event message only comes after I log out and log in again. What I am doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants