Hi iam new to arduino. I Have just bought my .new arduino nano and it was working properly. But today the problem appeared. After uploading the sketch to the arduino board everything is going smoothly. Lights are blinking as usual.But the led light i have linked with arduino is not working at all. Even the most simplest circuit is not working. I tried many times thinking that i having a fault in the circuit wiring but its not the problem
Hi, @kumaresh869
Welcome to the forum.
Can you please post your code, in code tags?
Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
Do you have a DMM? Digital MultiMeter?
Thanks.. Tom..
![]()
Sorry, i am new to arduino forum. I will let u know the above required information as soon as possible
In your situation I always:
- Disconnect everything
- Load "Blink without delay" from the files/examples/digital.
- verify the sketch has the correct address for the Nano built in LED
- Then run this program and see if the on board LED blinks or not.
I actually did so. But the led of the nano board beside the letter 'L' was not blinking. Instead it just blinked for a single time on the led beside the letter 'RX'
In the Arduino IDE click on Edit, then click on Copy for Forum, that will copy your code.
Then come back here and just paste your code.
Did you change the sketch to pin23 for the LED? Not sure if this is actually needed but its good to check.
#define led_pin 8
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
I dont have DMM
I have used rgb led,i just connected green coloured pin and the common pin
You did it wrong somehow
Should look like this:
#define led_pin 8
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Oh i just copied and pasted if from arduino ide
Can i use 220 ohm resistor?
const int redPin = 7;
const int greenPin = 6;
const int bluePin = 5;
void setup()
{
pinMode(redPin,OUTPUT);
pinMode(greenPin,OUTPUT);
pinMode(bluePin,OUTPUT);
}
void primaryColors(int redValue, int greenValue, int blueValue)
{
digitalWrite(redPin, redValue);
digitalWrite(greenPin, greenValue);
digitalWrite(bluePin, blueValue);
}
void loop()
{
delay(1000);
primaryColors(1,0,0); // Red
delay(1000);
primaryColors(0,1,0); // Green
delay(1000);
primaryColors(0,0,1); // Blue
delay(1000);
primaryColors(1,1,0); // Yellow
delay(1000);
primaryColors(1,0,1); // Magenta
delay(1000);
primaryColors(0,1,1); // Cyan
delay(1000);
primaryColors(1,1,1); // White
delay(1000);
}
i have used this code and tried to run my rgb led. unfortunately not working
Why is your Nano floating in the air when you have a breadboard with lots of space? If you build circuits like that, they will be unreliable.
There is a reason that the Nano was designed with that shape and with its pins in two rows!
Yes
You changed your code so my diagram won't work.
Is the LED common cathode or common anode?

