the on board LED from pin 13 on the UNO is very dim. Is there a reason for this and can I make it brighter
Can you provide more details on what your trying to accomplish or is this just a general issue with your board?
Set pin 13 as an output in the setup function, using the pinMode() call.
RodneyB:
the on board LED from pin 13 on the UNO is very dim. Is there a reason for this and can I make it brighter
- Uploading a blinky sketch from example to blink the LED 13.
- Now if the LED 13 is dim, try connecting pin 13 to another LED and a 300 Ohm resistor to the ground . If another LED is bright, the led on board is problem. If another LED is still dim, your board might be problem.
Here is my code
int LEDpin=12;
int LEDpin2=13;
int LEDpin1=11;
void setup()
{
pinMode(LEDpin, OUTPUT); //set the digital I/O pin to OUTPUT mode
}
void loop()
{
// void loop() {
digitalWrite(LEDpin, HIGH);
delay(1000);
digitalWrite(LEDpin, LOW);
delay(1000);
digitalWrite(LEDpin2, HIGH);
delay(1000);
digitalWrite(LEDpin2, LOW);
delay(1000);
digitalWrite(LEDpin1, HIGH);
delay(1000);
digitalWrite(LEDpin1, LOW);
delay(1000);
}
An output pin needs to be made an output.
pinMode(LEDpin2, OUTPUT) ; //set the digital I/O pin to OUTPUT mode
pinMode(LEDpin, OUTPUT) ; //set the digital I/O pin to OUTPUT mode
pinMode(ledpin1, OUTPUT) ; //set the digital I/O pin to OUTPUT mode
.
Just like I told you in reply #2 without seeing the code. So why have you ignored what I said? There is no point in asking for advice if you are going to ignore the answer.
Grumpy_Mike:
Just like I told you in reply #2 without seeing the code. So why have you ignored what I said? There is no point in asking for advice if you are going to ignore the answer.
I didnt ignore your answer, I took your advice and then posted it working, so anyone who had a similar problem would see the corrected answer.
I even gave you Karma points so asking and answering and taking advice all included and acknowledged
The code you posted would not have worked because you did not set pin 13 to be an output.
Grumpy_Mike:
Just like I told you in reply #2 without seeing the code. So why have you ignored what I said? There is no point in asking for advice if you are going to ignore the answer.
The corrected code sorry miss post
int LEDpin13=13; //select a digital I/O pin
int LEDpin12=12; //select a digital I/O pin
void setup() {
pinMode(LEDpin13, OUTPUT);//set the digital I/O pin to OUTPUT mode
pinMode(LEDpin12, OUTPUT);//set the digital I/O pin to OUTPUT mode
}
void loop() {
digitalWrite(LEDpin13, HIGH);
delay(1000);
digitalWrite(LEDpin13, LOW);
delay(1000);
digitalWrite(LEDpin12, HIGH);
delay(1000);
digitalWrite(LEDpin12, LOW);
delay(1000);
}
Thanks, much better.
RodneyB:
The corrected code sorry miss post
Have you got a spare board?
If your spare board has a bright led using the same code..... then you'll know the problem will be the led.