Hi guys. I need some help on a school project and thought I would come to the professionals to get some help.
I'm looking into using a arduino uno to control a servo, my thoughts are if I can make a sketch to download to as many pins as possible (not sure how many this allows? ) each pin to have a different program sequence of movement then to control the servo signal via a 12 pole rotary switch which will determine which sequence is selected.
Is this possible and are there any examples sketch out there for me to build on?
Taking up 12 digital inputs to select 12 different functions is a bit crude, there are easy ways to do this with less. For example you could use octal or binary input. Or how about a keypad - uses only 8 pins.
Hey Chris..really sorry but this is the first time I've seen an arduino and I've only been reading up on them for a week so I'm a real novice and after reading your reply I found dribble coming from my mouth!..haha. ....so in English that means..?
Well you should read up on the Arduino some more before you post a problem here. You need that so we can talk without having to explain everything. Everything you need to know is out there, both on this site, and youtube etc etc. Use the tab "learning above".
But, in the meantime, OK, am I right in thinking you want the user to be able to select one of 12 different functions (operations, programs or whatever you want to call them)?
Assuming that a yes, then you dont use a 12 way switch and 12 Arduino input pins. You can input a selection using just a small number of pins by coding the number, for example into Binary, Octal, BCD (look them up on google). Or you could use a key pad, which has 8 pins - 4 rows and 4 columns - and when you connect that up then you can put any number into the Arduino. Of course, you will have to write the code to make the Arduino read the input, then do all the controlling of the servo. But much of these programs have already been written, so you just copy the code into your own program.
I am new to the Arduino myself, but have just completed my first project - to accurately control the speed of a DC motor using negative feedback control. It's great fun and I wish you the best of luck.