hi,
I have two question. first one is I want to see if an input pin LOW, or HIGH. for example if a door is open I want it will be written in “Door Open” text widget. if closed Door closed must be written according to arduino pins state.
the second one how can I create push button effect with switch as because there is no push button widget in dashboard.
When you configure a button over this resource, you will see how it is activated, and after 300 milliseconds, it turn off again. You should define the pin to control, and also the momentary HIGH time (300 ms in this example).
For defining a resource that show open or close, you must create it in the source. At this moment it is not supported in the console. So you can implement it as the following:
thing["state"] >> [](pson& out){
out = digitalRead(statePin) == HIGH ? "Door Open" : "Door Closed";
};