Motion sensor servo motor

Hello, I am very new to Arduino and I only started using it a couple of days ago. Placing the wires and sensors on the motherboard and the breadboard is pretty self explanatory, but I was having some trouble on finding code particularly for this project I am working on. I have looked throughout the internet and I was unable to find the code I was looking for. I have a motion detector (
ALAMSCN 6PCS AM312 Mini IR Human Sensor Module HC-SR312 Pyroelectric PIR Infrared Motion Automatic Detector for Arduino + Dupont Wire)
that when it detects motion, it spins a servo motor (SM-S2309S) from 0 degrees to 180 degrees for 5 seconds. I want it to take 1.5 seconds for it to move from one side to the other and when it reaches 0 or 180 degrees, it stays there for 0.5 seconds. After the 5 seconds are done, it resets and the motion detector turns back on and is able to detect motion again and repeat the process. I really need help and have looked for over an hour to try and find the code but I couldn't. I would really appreciate it if someone could help me with the code.

Hello, you wrote a good specification!
Now you have to wait until someone is bored to program your problem! And when he did, how are you going to get it working?
The only right way: learn and try for yourself!

More often than not, you don't "find code", you write it.

If you don't want to write it, try posting in "gigs and collaborations"

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