loading

arduino program to sweep servo when hall sensor high

i want the program to control the servo such that when the hall sensor senses the magnet the servo should sweep and when hall sensor again senses the servo should come to its original place

so guys please tell me how to do it and also tell me connections

sort by: active | newest | oldest
iceng1 month ago

So how are you doing in your Arduino-Class ?

You basically ask that someone does it all for when all you need to do is copy and paste from the Arduino playground.
-Take the corresponding examples, modify where needed and paste them into your sketch....

vipulg (author)  Downunder35m1 month ago

I am a beginner i had bought arduino recently i only know very little about programming i am just asking for help

Get a servo moving with the servo library. Look at the examples in the playground.

Adding a switch is easy. You'll learn about programming if you do it yourself.

What have you tried so far ? You have described what you want clearly, so how will you go about it ?

vipulg (author)  steveastrouk1 month ago

i had tried some examples like led will glow when hall senses magnet but i m not getting how to actually put it into my project

iceng1 month ago

U need to supply 5v to the arduino and hall sensor and a different voltage voltage to the servo.. Every item, two power supplies, the arduino, hall sensor servo all share a common ground..

Now select an input pin for the hall sensor on the arduino and an output pin for the control signal to the pulse width into the servo..

Take the easy free Arduino class at

https://www.instructables.com/class/Arduino-Class/

After the class you should be able to program your arduino to sweep your servo...