Skip to content

Creating a switch action that toggles relay N number of times. #2118

Discussion options

You must be logged in to vote

Answered my own question. Turns out the inching time for binary outputs represents an overall timeline in seconds from 0 in which the level reverts back to previous state. So for example if you wanted to rapidly toggle a relay three times and ending in the off position you would need something like the following:

{"r":[[12,1,0.25],[12,0,0.5],[12,1,0.75],[12,0,1],[12,1,1.25]]}

Where the GPIO pin being toggled is 12, and the toggle occurs every quarter of a second.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by michaelmedellin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant