Jump to content

Use keyboard to control servo via keyboard input

tydraestor

So i have a sparkfun pro micro, and i want to be able to move a servo back and forth to control a camera from my computer via keyboard input, i have no idea where to start. I an very new to arduino and my science teacher asked me to do this for a security camera

20180926_165904.jpg

images (6).jpeg

Link to comment
Share on other sites

Link to post
Share on other sites

I'll presume you already know how to wire servos properly (Needing external power)

 

What I'd do is get a bluetooth or wireless component for the arduino & get a bluetooth piece for the computer. Once I have that, I'd program a way to have the computer talk to the arduino using bluetooth. 

 

You'd have to write one program for the Arduino & one program for the computer. 

Link to comment
Share on other sites

Link to post
Share on other sites

Look into the PWM outputs. You'll use that to control your servo. In theory you should only need to hook your yellow servo wire to one of the PWM outputs (and a separate power source) and write some code to send the right signal to the servo. It's been done before, Google is your friend in this case. 

 

Once you have worked out how to control it through your arduino, it's a simple case of changing a variable via keyboard input. 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×