Go Down

Topic: Blink example on pin 13 led does not work... (Read 6187 times) previous topic - next topic

RL93

Apr 10, 2016, 01:45 pm Last Edit: Apr 10, 2016, 01:58 pm by RL93
Hello!

I purchased an Arduino Uno today and was so happy, until I was going to upload my first program... The blink example on pin 13 led.  :'(

It does nothing! No blinking at all, not even once...

Is the pin 13 led broken or something?
Have I done something wrong?

pert

Which Arduino did you buy? Did the program upload successfully?

RL93

Which Arduino did you buy? Did the program upload successfully?
Sorry, forgot to say that, Arduino Uno :)

Yep, successfully uploaded the program

JimboZA

Try this slightly modded blink. Open the serial monitor and see if it tells you it's in setup() once then at the top of loop() each time through.

Code: [Select]
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the Uno and
  Leonardo, it is attached to digital pin 13. If you're unsure what
  pin the on-board LED is connected to on your Arduino model, check
  the documentation at http://www.arduino.cc

  This example code is in the public domain.

  modified 8 May 2014
  by Scott Fitzgerald
 */


// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
  Serial.begin(9600);
  Serial.println("in setup()");
}

// the loop function runs over and over again forever
void loop() {
  Serial.println("in loop()");
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second
}


Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

RL93

Yep, I see the message setup() and then adds loop() message every second. The only thing blinking is TX, not the L

Try this slightly modded blink. Open the serial monitor and see if it tells you it's in setup() once then at the top of loop() each time through.

Code: [Select]
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the Uno and
  Leonardo, it is attached to digital pin 13. If you're unsure what
  pin the on-board LED is connected to on your Arduino model, check
  the documentation at http://www.arduino.cc

  This example code is in the public domain.

  modified 8 May 2014
  by Scott Fitzgerald
 */


// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
  Serial.begin(9600);
  Serial.println("in setup()");
}

// the loop function runs over and over again forever
void loop() {
  Serial.println("in loop()");
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second
}




MalharD

Connect another LED to pin 13 and try again.
Murphy always gets me ...

JimboZA

OK well that at least tells us the board's not stuffed. The Tx will blink each time it does the Serial.println();

Next thing is to get a loose LED and resistor and put the anode into pin13 and the cathode to ground and see if it blinks, and / or try the same on another pin.



Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

waRBooz

Hi All,

I have similar problem but on the Arduino Leonardo and Arduino Leonardo Eth. When I upload the example program the diode on the board is blinking but it seems that there is no voltage on the output pins. Because it is the same on both boards I suspect I'm missing something basic.
Boards are powered with the USB cable, they are new and I'm using latest IDE on Windows 7.

Any ideas what can be wrong?

Regards

JimboZA

Any ideas what can be wrong?
Did you try my blink code with serial prints in, to see if the board is actually working?

Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

waRBooz

#9
Apr 11, 2016, 09:41 am Last Edit: Apr 11, 2016, 07:41 pm by waRBooz
I've uploaded the program sending messages thru serial port. I can see in_loop messages and the diode is blinking. Any idea why there is no voltage on the output pins?

Go Up