0

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.

asked May 3, 2015 at 11:47
16
  • 1
    For your second snippet, you will never be able to see a single blink, that's because a second 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 Commented May 3, 2015 at 11:56
  • No oscilloscope, or anything else to check frequency. This is my first attempt playing with hardware like this but even if it was at 16MHz wouldn't the blink speed still change? I tried many different values in there and it never changed. Commented May 3, 2015 at 12:00
  • Do you have and LED (and resistor) connected to digital pin 9 or is it the on board LED (which is on digital pin 13) you are observing ? Commented May 3, 2015 at 12:39
  • I've tried pin 9 with resister and I've tried 13. Same result with both. Same fast blink that doesn't change no matter what delay value ( I've tried up to 100000). I tried a previous version of the arduino IDE also. Same thing. Commented May 3, 2015 at 12:43
  • 1
    Have you corrected the code? You must change the pin state to LOW, then delay, HIGH and again a delay! Also, mind that the internal led is on pin 13! Commented May 3, 2015 at 12:46

2 Answers 2

0

Added as new answer because comments limit was reached Doesn't really matter which programmer you set because in this instance you're not actually burning the bootloader just setting the fuses (to those already stored in boards.txt for the Uno) but 'Using Arduino as ISP' is the nearest to what you're doing

answered May 3, 2015 at 19:47
0

Defective board. Thanks to @br1an for the milli idea. New board in the way, not a clone.

answered May 4, 2015 at 12:58
2
  • it's @Bra1n but you're welcome anyway Commented May 6, 2015 at 9:14
  • Sorry for the typo, thanks again for all the help. Commented May 6, 2015 at 10:06

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.