Finally got around to playing with my uno today for the first time. ( It's a branded sunfounder UNO R3)
First project. Simple blink. Using arduino 1.6.3, Windows 8.1 It is hooked up correctly.
void setup() {
// initialize digital pin 13 as an output.
pinMode(9, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(9, HIGH); // turn the LED on (HIGH is the voltage level)
delay(10000); // wait for a second
digitalWrite(9, LOW); // turn the LED off by making the voltage LOW
delay(10000); // wait for a second
}
What I get is a fast blinking LED. I've tried multiple values and it doesn't change. No error on upload. I've commented out everything except the digitalWrite(9, HIGH); and I get a fast blink.
I tried:
void loop() {
digitalWrite(9, LOW);
delay(5000);
digitalWrite(9, HIGH); // turn the LED on (HIGH is the voltage level)
}
And I get nothing, it doesn't even turn on.
Same if I remove the first digitalWrite();
So, I'm already a little lost here. I did a but of google searching tried adding a serial 9600 line, and a few other things. Nada.
delay(5000)
misses, in the end of the main loop. If you have an oscilloscope, or anything that can measure a frequency, check if the embedded quartz beats at 16MHz