I have just purchased my first Arduino from Sparkfun and successfully set up the board for the blink program all was well until I tried to change the pin allocation for the LED. The Sparkfun booklet supplied says..."then in the code change the line:int ledpin = 13; to int led pin = newpin however this is not shown as the code line for the uploaded program fro the web site. The sample blink program reads...
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
void setup() {
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(13, LOW); // set the LED off
delay(1000); // wait for a second
}
I have tried changing the 10 to another pin in the line... "pinMode(13, OUTPUT);" but it will not work. Not happy with the very first simple attempt. AmI missing somthing obvious?
Mark :