Need Help! Can't get Servo motor to work with the Ir sensor!

Ok so, I recently received a school project in which I need to make a small range IR sensor radar. I plan to make it in the configuration that the IR sensor sits on top of the servo which continuously needs to rotate and make sweeps, upon sensory activation, a buzzer, kept at a slight distance will beep. Now on to the problem, I had no problems writing the code for the buzzer and ir sensor, but, I cant seem to make it so that the servo works alongside that, I'd really appreciate it if someone could help me with that. Also, one last thing, all the code, I've obtained from over the internet, they guy who was supposed to do the actual coding ditched me. So yeah. pls help me!

(PS: I'm a newbie!)

Hi @thecoderwhocodes
welcome to the arduino-forum.

After registering you got presented a link to a introductional tutorial about

You should really read it. Investing 20 minutes of time reading this tutorial will safe you minimum 200 minutes finishing this project.

How about goolging with keywords like arduino IR receive and servo?
Oh I had a misunderstanding. Sorry for that.
You are using an IR-distance sensor.

help us to help you by reading the tutorial and then post additional information that is needed to help you.

best regards Stefan

1 Like

Ok, will do, thanks a lot!

Hint: get rid of the delays.

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