I'm using a servo as a Gate i need a FLOW as follow ..when i push a button i need the servo to turn +90 degrees... stops for 2 seconds.... then turns back -90 degrees .....stop the loop .
THX in advance
Which hardware are you controlling your servos with?
When you asked this same question in April, there were some requests for more information including your flow and the output from a debug node.
You didn't respond.
yeah.....i fixed the problem then...back again i lost my files
a raspberry pi
This is the flow i'm using
[
{
"id": "9621d3f27c19df26",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "afd37a2a.7d9bd",
"type": "trigger",
"z": "9621d3f27c19df26",
"name": "",
"op1": "0",
"op2": "50",
"op1type": "str",
"op2type": "str",
"duration": "2",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 1120,
"y": 140,
"wires": [
[
"adf183b8d6237829"
]
]
},
{
"id": "e43ecaa0.3417",
"type": "inject",
"z": "9621d3f27c19df26",
"name": "",
"repeat": "",
"crontab": "",
"once": true,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 930,
"y": 140,
"wires": [
[
"afd37a2a.7d9bd"
]
]
},
{
"id": "adf183b8d6237829",
"type": "debug",
"z": "9621d3f27c19df26",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1340,
"y": 140,
"wires": []
}
]
Using an array and splitting with rate limit may work for you
e.g.
[{"id":"f05fbcd1.71d53","type":"inject","z":"30af2d3e.d94ea2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[\"5\",\"50\",\"5\"]","payloadType":"json","x":120,"y":1820,"wires":[["b0bee5a2.c437c"]]},{"id":"b0bee5a2.c437c","type":"split","z":"30af2d3e.d94ea2","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":280,"y":1820,"wires":[["36349c79.ff17fc"]]},{"id":"36349c79.ff17fc","type":"delay","z":"30af2d3e.d94ea2","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"2","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":450,"y":1820,"wires":[["39de014b.18229e"]]},{"id":"39de014b.18229e","type":"debug","z":"30af2d3e.d94ea2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":700,"y":1800,"wires":[]}]
So you want to send 5, wait 2 seconds, send 50, wait 2 seconds, send 5, stop?
@E1cid's flow will do that or alternatively this with 3 trigger nodes
[{"id":"afd37a2a.7d9bd","type":"trigger","z":"9621d3f27c19df26","name":"Send 5","op1":"5","op2":"","op1type":"num","op2type":"nul","duration":"2","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":380,"y":100,"wires":[["adf183b8d6237829","c6331d84dde6e266"]]},{"id":"e43ecaa0.3417","type":"inject","z":"9621d3f27c19df26","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"","topic":"","payload":"","payloadType":"date","x":190,"y":100,"wires":[["afd37a2a.7d9bd"]]},{"id":"adf183b8d6237829","type":"debug","z":"9621d3f27c19df26","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":600,"y":100,"wires":[]},{"id":"c6331d84dde6e266","type":"trigger","z":"9621d3f27c19df26","name":"2sec, send 50","op1":"","op2":"50","op1type":"nul","op2type":"num","duration":"2","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":400,"y":140,"wires":[["adf183b8d6237829","804ffeba900630d2"]]},{"id":"804ffeba900630d2","type":"trigger","z":"9621d3f27c19df26","name":"2sec, send 5","op1":"","op2":"5","op1type":"nul","op2type":"num","duration":"2","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":390,"y":180,"wires":[["adf183b8d6237829"]]}]
many thx you are genius ![]()

