marcoschwartz / aREST_UI

Embedded UI for the aREST framework
72 stars 34 forks source link

Toggle and Momentary Buttons #15

Open rjkorn opened 8 years ago

rjkorn commented 8 years ago

Feature request Please!

I'd love to see 3 additional button types...

Toggle-Button

Toggle-Buttons are used to Toggle the state of a digital output pin. The command creates one button inside the interface labelled as specified. For example, the following command creates a button to Toggle pin number 6 labelled 'Flip-It':

ui.toggle(6,'Flip-It')

Pulse-High-Button

Pulse-High-Buttons are used to momentarily raise the state of a digital output pin. The command creates one button inside the interface labelled as specified. The initial state should be set manually by the user in their setup code. For example, the following command creates a button to raise pin number 6 high for 300 milliseconds labelled 'Beep':

ui.pulsehi(6,300,'Beep')

Pulse-Low-Button

Pulse-Low-Buttons are used to momentarily lower the state of a digital output pin. The command creates one button inside the interface labelled as specified. The initial state should be set manually by the user in their setup code. For example, the following command creates a button to drop pin number 6 low for 500 milliseconds labelled 'Flash':

ui.pulselo(6,500,'Flash')

I'm going to try the toggle button myself but it may not be pretty.......

marcoschwartz commented 8 years ago

Great ideas! This is something I am already starting to implement for the cloud dash of aREST, so it should be easy to do here as well :)

firesprite78 commented 8 years ago

Very cool project and with this features it was to be PRICELESS! Wait for update((