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.

  • 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 – Spirine May 3 '15 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. – TheEditor May 3 '15 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 ? – Bra1n May 3 '15 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. – TheEditor May 3 '15 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! – Spirine May 3 '15 at 12:46
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

0

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

  • it's @Bra1n but you're welcome anyway – Bra1n May 6 '15 at 9:14
  • Sorry for the typo, thanks again for all the help. – TheEditor May 6 '15 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.