Arduino with servo control and interesting inputs

I have been through tthe forums search engine to find the pins for servo control but am still very much a n00b with this. I'd like to setup a conditional system code so the inputs (with varying voltages) will control the servo movement.
The inputs for this project would be two 5v sensors (MAP and TPS) the voltage changes will show conditions and the arduino will then modulate the servo movement. Whether the movement is simply calculated by an adder system to show linear progression or uses a register/table to return the servo position will be found out during development.
I am sorry if this is in the wrong place but I wish to make sure I can do this before buying the setup. If I can expect MANY more things ;D

You can connect one or two servos to the Arduino and control them via a software library:

For the 5V sensors, you can read a 0-5V varying analog voltage using the Arduino's analog-to-digital convertors (ADC). There are six channels in all, accessed by the analogRead function:

http://arduino.cc/en/Reference/AnalogRead

Can you tell us a bit more about the conditional logic that you want to build?

Ah conditional logic :smiley: unsure of whether I would call it that given my usual programming projects but it will be VERY simple.
Initially I will have a simple linear progression table of sorts so:
Sensor1 will be 0-5 in table as x
Sensor2 will be 0-5 in table as y
so lets say the coords are 0,5 the output would be 5 (out of 10) and therefore 5,0 would be 5 as well. Making 5,5 the only maximum value.
This would give a good range of movement for me as well as allowing me to check I've done it right.
I will then change the array to give more appropriate results on car.
The actual design is for a variable exahust like in many posh cars using a MAP sensor (to sense exahust backpressure) and a TPS (to sense throttle position :D) that way the urgency of my driving should allow control of the servo and in turn change my exhaust noise to suit the circumstances.
I'm also thinking of an override momentary to stop all processing and keep it quiet regardless. I realise there are systems that do this already but £450 for something mechanically I can build for bugger all and hopefully program for what is basically just my time.

Use a 2-D byte array.

const uint8 mapTable [6][6] = { {0, 30, 60, 90, 120, 150},
{.....},
....
};
...
servoPos = mapTable [map(analogRead(SENSOR_2), 0, 1023, 0, 5)]
[map(analogRead(SENSOR_1), 0, 1023, 0, 5)];

Then you can fiddle with the values in the array to your heart's content.

Thanks a lot for the help so far.
I'm a through and through geek (jobs have included biomedical scientist, programmer -private only-, video games shop manager) so love anything that I can build (and if it works thats even better).
Unfortunately my programming experience began with BASIC (yes I am that old) and I've stuck with it so am now using VB.net under Microsoft licensing ;D
Arduino's use C which is about as familiar to me for programming as eating razorblades. So hopefully my good old text books will help me and community can direct me :wink:

Kitchen is being done and I'm rewiring my car so this won't happen for a little bit but hopefully I can do some properly planning ready for the "off".

BASIC (yes I am that old) and I've stuck with it so am now using VB.net under Microsoft licensing

Don't worry, you can get counselling now, I believe.

I still get flashbacks {{{shudders}}}

Well as I now know the hardware can do what I want I figure I should give you guys a list of my ideas.
Variable exhaust valve - turn your beast car into a quiet car in suburbia then a mental on the track.
Intelligent water injection - two setups working together to maintain power and safety in your car.
ChaseBot - follow IR beam from the back of my RC car to video it racing or drifitng.

Accroding to various projects in the exhibition area these should be easy :-? so all that remains is money and time ::slight_smile:

Don't worry about the BASIC -- I started on the same thing, with a Compukit UK101. As long as you understand the principle of programming, the language can be learned.

Just had a brilliant idea for a more advanced project too. I really want a CNC machine and have started to do a frame (the cheap part) but I was going to do a system control using known things but now I'm wondering if I should should automate the whole thing.
3 axis control, variable drill speed and communication. Then create second unit for GCode interpretation and SD card use.
I'm positively getting more excited about this at every moment.

Wahey a Bristol boy, I'm in Trowbirdge.