How to flash a LED?

Does someone now how i can flash my ligt on 1hz. I want to do it in a function.

this is what i have for color, now i want to flash it on 1hz??
image

Did you search the forum/flows ? Did you read the documentation ?

To flash the LED, you will have to send it a message every second to turn it on or off.

How long do you want to flash it for? I assume at some point you'll want it to stop flashing? How do you control that?

image

So i use a numeric: 1 is led1 blue / 2 is led1 red / 3 is led1 green /.... 8 colors long.
than 9 needs to be led1 blue but flashing at 1hz the holle time it may only go out if i change the numeric.

I searched some thongs about blinking a led and found some information .
i have a flow when payload 9 is set by numeric led 1 flash every 2 sec. But i want it to go out when i change from payload .

this is info that i found : [{"id":"740a99d2.b07d1","type":"function","z":"b71ac87f.d81188","name":"startBlink","func":"var BLINKDELAY = 250;\n\nvar light = true;\n\n\nvar blinker = setInterval(blink, BLINKDELAY);\n\nglobal.set("blinker", blinker);\n\nfunction blink () {\n \n if (light) {\n msg.payload = 1;\n light = false;\n }\n \n else {\n msg.payload = 0;\n light = true;\n }\n \n node.send(msg);\n}\n\n\nreturn;","outputs":1,"noerr":0,"x":282,"y":153,"wires":[["41b167bc.bbffc"]]},{"id":"73f5f278.0231bc","type":"inject","z":"b71ac87f.d81188","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":126,"y":153,"wires":[["740a99d2.b07d1"]]},{"id":"41b167bc.bbffc","type":"rpi-gpio out","z":"b71ac87f.d81188","name":"","pin":"15","set":"","level":"0","out":"out","x":471,"y":153,"wires":},{"id":"cc1b11b1.bebb28","type":"function","z":"b71ac87f.d81188","name":"stopBlink","func":"clearInterval(global.get("blinker"));\n\nmsg.payload = 0;\n\nreturn msg;","outputs":1,"noerr":0,"x":288,"y":225,"wires":[["41b167bc.bbffc"]]},{"id":"5db82a6c.1b547c","type":"inject","z":"b71ac87f.d81188","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":123,"y":226,"wires":[["cc1b11b1.bebb28"]]}]

this is my flow : [{"id":"2fac170c.3341f8","type":"ui_numeric","z":"2df27252.fc52ce","name":"","label":"LED 2","group":"95c63973.5f2fe8","order":1,"width":0,"height":0,"passthru":true,"topic":"","format":"{{value}}","min":"0","max":"28","step":1,"x":728,"y":2320,"wires":[["fd5eb88f.be0ed8"]]},{"id":"fd5eb88f.be0ed8","type":"function","z":"2df27252.fc52ce","name":"werkt","func":"if (msg.payload === 9) \nreturn msg;\n ","outputs":1,"noerr":0,"x":870.0001068115234,"y":2317.000120162964,"wires":[["86aca0a9.36203"]]},{"id":"86aca0a9.36203","type":"function","z":"2df27252.fc52ce","name":"WERKT","func":"\nvar BLINKDELAY = 2000;\n\nvar light = true;\n\n\nvar blinker = setInterval(blink, BLINKDELAY);\n\nglobal.set("blinker", blinker);\n\nfunction blink () {\n \n if (light) {\n msg.payload = 1+','+ 0 +','+ 0 +','+ 255;\n light = false;\n }\n \n else {\n msg.payload = 1+','+ 0 +','+ 0 +','+ 0;\n light = true;\n }\n \n node.send(msg);\n}\n\n\nreturn;","outputs":1,"noerr":0,"x":1022.000114440918,"y":2318.000120162964,"wires":[]},{"id":"95c63973.5f2fe8","type":"ui_group","z":"","name":"TEST","tab":"62115615.d43ac8","order":5,"disp":true,"width":"6","collapse":false},{"id":"62115615.d43ac8","type":"ui_tab","z":"","name":"ProTrac demo case","icon":"dashboard","order":2}]

Your flows are not importable. Please read this thread and edit your previous post to fix the flows.