Thanks for the observation.
Ive been meaning to get into the arduino. Just been delaying due to time investment in the programing side.
Im more hardware inclined but i due realize the benefits of bieng able to control outputs with the stroke of a key.
Any recomendations on best way to get started?
Sure: get yourself an Arduino Uno, the basic unit, which can be had for as low as 17 dollars from the internet if you can wait for shipping from Thailand or China, or around 27 dollars in-store from Radio Shack or fast USA shippers like SparkFun.
You can download the programming interface from the main Arduino website right away, and start playing around with it, exploring the basic examples that are included to get the hang of programming (it's basically a flavor of the "c++" programming language, very easy to learn and use.) Then when you have the Arduino, just start loading up the examples and playing around with changing stuff in the program to see what it does.
Then for specific applications, look on the web, there are millions of Arduino programs out there that can be modified to your specific needs.
I just whipped up this following sketch to show the use of the PWM outputs of the Arduino. The sketch above just cycles thru all the digital outputs turning them HIGH in sequence, with no "brightness" control. The sketch below just activates the six PWM outputs of the Uno and uses the potentiometer to control the fade rate as the PWM is swung thru its full range, fading the LEDs up to full brightness and back down to off. So a transistor on the PWM output can then be used to control whatever, downstream, like a motor speed or the current to an electrolysis cell.
/*******************************************************
Fader PWM Tester
This example shows how to fade an LED on pins 3,5,6,9,10,11
using the analogWrite() function.
This illustrates the Arduino "Pulse Width Modulation" control system.
The Uno uses these six pins for PWM, but the Mega can use all
the pins from 2 thru 13 for PWM.
Wire the LED anodes to each PWM pin, cathodes to 470R to Ground pin.
Modified from the Arduino "Fade" example sketch by TK, December 2013
Released to Public Domain
**********************************************************/
int led[] = {3,5,6,9,10,11}; // array of PWM pin numbers
int pinCount = 6; // how many PWM outputs in array
int n = 0; // just a counter
int brightness = 0; // how bright the LED is
int fadeAmount = 1; // PWM increment: how many points to fade the LED by each time thru loop
int potPin = 0; // potentiometer wiper to control fade rate
void setup() {
for(n=1;n<=pinCount;n++)
pinMode(led[n], OUTPUT);
}
void loop() {
for(n=0;n<=pinCount;n++)
// loop thru LED PWM pin array, set brightness
analogWrite(led[n], brightness);
// change the brightness for next time through the loop:
brightness = brightness + fadeAmount;
// reverse the direction of the fading at the ends of the fade:
if (brightness == 0 || brightness == 255) {
fadeAmount = -fadeAmount ;
}
delay(map(analogRead(potPin),0,1023,3,30));
// reads potentiometer, maps reading to set fade rate PWM increment from 3 to 30 ms
}
/*************************************************************************/