Pan tilt servos

I want to sweep a 360 degree servo for 4 seconds to the right then delay for 5 seconds then sweep the servo to the left for 4 seconds then delay for 5 seconds then repeat till I send a stop command. I can move the servo but in the function node I don't know how to write the script.
So I need a delay or seTimeout and a loop to do so. Thank you. Ron.

You don't give us much to go on here, but I would suggest you look at the trigger node.

thank you that did what i was trying to do BUT,, I don't know how to stop it. how do i send my flow so you could have a bit more info to help me I don't remember how to do that. Ron. """ or ... i don,t know.

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

   code goes here 

You can edit and correct your post by clicking the pencil :pencil2: icon.

See this post for more details - How to share code or flow json

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.