A node inspired by mod-N/divide-by-N counters like SN74LS90/92 logic ICs. I needed this, as I am building some 555 timer based experiments, and I do not have any hardware counters yet. Thought I will simulate it in node-RED in the meantime. Releasing it to public in case others need to use this.
The examples have been released with the latest package that demonstrates:
- Using the counter by itself and as a delay based on incoming data.
- Using the counter in a series with other mod-n counters to count and delay execution based on incoming data
- Using the counter and resetting it from another part of the node when needed.
The input to the counters can be:
- An array of JSON objects with 2 properties: topic and value. Topic may be "reset" or "set" depending on what you want the counter to do, and value could be 1 or 0. When resetting the node will expect the value to be 1
- A JSON object with a similar structure as detailed above
- A numeric payload with a value of 1 or 0, which will be assumed as a "set" operation by the node
Find details about the node at this link