Go Down

Topic: reading analogpin to servo position (Read 155 times) previous topic - next topic

soundfxsc

Hey everyone,
new to arduino, I must confess it is a lot out of my comfort zone. Can anyone give me some pointers or even write a program that can read all analog pins (0-15) in order and convert that to a servo position. Basically I need to be able send the arduino 15 different resistance values and get 15 different servo positions. It sounds easy but I am completely lost. I can make it sweep with potentiometer,  but that's where my ability ends...someone help this old man out!
Thanks

DH12043

what are you using to get the resistance values?
what board are you using, arduino Mega?
Are the servos 180*?

soundfxsc

Mega 2560 and hoping to use standard resistors, however if needed I can use the potentiometers.

jremington

#3
May 17, 2018, 03:56 am Last Edit: May 17, 2018, 03:56 am by jremington
We strongly recommend that beginners work through the example projects -- blink an LED, read a button, a voltage, a temperature or light sensor, control one servo -- in order to learn the programming language and the special features of the Arduino.

If you don't, expect endless frustration in an advanced project such as the subject of your post.

Quote
I can make it sweep with potentiometer,  but that's where my ability ends.
This is a good start, but it sounds like you don't understand what the program is doing. Make sure you do before moving on.

If you want help with an example program, post it properly, after reading "How to use this forum" and ask specific questions.

soundfxsc

Unfortunately my spare time is limited. This project has a deadline of approximately 2 weeks. While I intend to continue learning this c++ language,  I'm sure it will take much longer than the few hours a week I have to learn what I need.

jremington

If you want someone to write code for you, post on the Gigs & Collaborations forum section, and be prepared to pay.

soundfxsc

Expected to pay, thanks for sending me to the right place

Go Up