I have some trouble with my arduino. I follow a simple tutorial to simply blink a led but my led only blink when I use the pin 13 and not the other pins.
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
}
Do you have an idea of why it doesn't work on the other pins?
Thanks
Yes i am using a appropriate resistor for the led and I also change the number of the pin in the code. The code is always compiling but the led is never blinking when I don't use the pin number 13(I also change the connection on the board).
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
}
ok, so this code is compiling but the led is not blinking:
void setup() {
pinMode(3, OUTPUT);
}
void loop() {
digitalWrite(3, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(3, LOW); // set the LED off
delay(1000); // wait for a second
}
yes that right I have a led plus resistor connecter to pin 3.
I have no access to my school because of the virus so I have to access to multimeter or any other thing that can help me understand that can of signal I get from pin 3.
You need a 270 ohm resistor from pin 3 , that then connects to the led . The other side of the led is connected to Ov.
And .... you have tried turning the led around ?
If it still doesn’t work , the led maybe duff ? Does it light if you connect it to the 5v pin and Ov pin with the resistor in series ? If not the led is dead . If at some time you have connected the led directly to a power source without the resistor , then it will be dead .