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

Feature request: a button #3

Open
dhunink opened this issue Oct 22, 2016 · 2 comments
Open

Feature request: a button #3

dhunink opened this issue Oct 22, 2016 · 2 comments
Assignees

Comments

@dhunink
Copy link

dhunink commented Oct 22, 2016

Hi!
After playing with Thinger.io for the past few days (it's amazingly awesome) I'm missing one great feature: a possibility to fire a single event on an Arduino right from the dashboard. Similar to what would happen if you pushed a physical push button.
For instance: I'm using Thinger.io to control the LED lightning in my Aquarium. On set times a sunrise or sunset effect would start to run. But I would love to create a way to fire additional effects like:

  • stopping all current effects
  • starting a lightning-strike-effect

Are there any plans to facilitate triggers for such purposes?

schermafbeelding 2016-10-22 om 12 22 20

@alvarolb alvarolb self-assigned this Oct 22, 2016
@alvarolb
Copy link
Member

alvarolb commented Oct 22, 2016

Hi, @dhunink, thanks for your suggestion. It certainly takes sense to add a single button to fire callbacks in the code, as you can already define them as described in the documentation. I will add this feature to the list.

At this moment, you can simulate that by defining a simple input function, and assigning a button in the dashboard to this input. You will see how the button will turn off after pressing it, so you can click it any time you want. To avoid any undesired behaviour, you should check that the input is not empty.

thing["stop_effects"] << [](pson& in){
    if(!in.is_empty()){
        // do your stuff here
    }
};

By the way... Nice Dashboard!

@dhunink
Copy link
Author

dhunink commented Oct 23, 2016

@alvarolb thanks for the quick and positive response, I'm certainly looking forward to that feature becoming available!

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

No branches or pull requests

2 participants