View Single Post
Old 03-27-2009, 07:56 AM   #8 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
here is the basic arduino blink-the-led program, everyone starts by getting this working, so try and understand what each line is doing. There is a built in LED on pin 13, you have up to 20 pins to play with (I use php tags cuz it looks pretty, but it is C).

PHP Code:
int ledPin 13;                 // LED connected to digital pin 13

void setup()
{
  
pinMode(ledPinOUTPUT);      // sets the digital pin as output
}

void loop()
{
  
digitalWrite(ledPinHIGH);   // sets the LED on
  
delay(1000);                  // waits for a second
  
digitalWrite(ledPinLOW);    // sets the LED off
  
delay(1000);                  // waits for a second

borrowed from:
http://www.arduino.cc/en/Tutorial/Blink

Have you considered posting on the arduino.cc forum? This learning stuff is right up their alley, though I'm sure more than a few ecomodders don't mind the exposure either. It is a very enabling technology.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!

Last edited by dcb; 03-27-2009 at 10:35 AM..
  Reply With Quote