My Arduino UNO Rev2 IO pins do not work despite proper code and setup upon digital write command. There is no output voltage in all the pins. However, the digitalRead command works fine. (For example, readings from sensors)
What may be the issue here guys>Help needed ASAP.
THE CODE:
int ledPin=13;
void setup(){
pinMode(ledPin,OUTPUT);
}
void loop(){
digitalWrite(ledPin,HIGH);
delay(1000);
digitalWrite(ledPin,LOW);
delay(1000);
}
CIRCUIT:
Note:resistor=220ohm.LED works
Please post a sketch that shows the problem
I assume that you have set the pinMode()s correctly. They default to INPUT
1 Like
Post the code otherwise everything is a guess...
1 Like
THE CODE
int led=13;
void setup(){
pinMode(ledPin,OUTPUT);
}
void loop(){
digitalWrite(ledPin,HIGH);
delay(1000);
digitalWrite(ledPin,LOW);
delay(1000);
}
THE CODE
int led=13;
void setup(){
pinMode(ledPin,OUTPUT);
}
void loop(){
digitalWrite(ledPin,HIGH);
delay(1000);
digitalWrite(ledPin,LOW);
delay(1000);
}
Try a different pin. The led pin can act differently because of the led on it.
Tried. Doesn't work on any of them. Only input reading from sensors work
Try your LED the other way round.
Tried. The polarity is correct. The longer leg of the led is connected to the positive terminal.Shorter leg is grounded
Test the pins with a multimeter.
Test your LED by connecting it to 5V and GND.
The 'L' Light is active on the PCB you have, so there is an output.
1 Like
Don't worry, we will get to the bottom of this.
Do you have a multimeter to measure the resistor ? It does not seem to be red-red-brown.
The yellow led with the 'L' next to it is already connected to pin 13. Can you remove the wires and try to blink the onboard yellow led ?
Does the led+resistor turn on if you apply the red wire to the 5V Arduino pin ?
Check the connector and the soldering of the connector and the pcb traces.
Was perhaps the connector bend, and thereby breaking the connections ?
That is a official Arduino board, but years old. Did you or someone else use it a lot ? It is possible to damage parts of the chip of the microcontroller in a way that most things work and few things not.
1 Like
The code in reply#6 does not compile
ledPin is not declared. Are you sure that you posted the correct code ?
Hi! The resistor is indeed 220ohm. The output using digitalWrite doesn't work for servo, motors, any output intended devices indeed. I will measure it using a multimeter. However, the input works. Ex:Distance ultrasonic sensor, temperarure sensor, etc
Hey, that was posted by mistake. The original post at the top contains the correct code
Its the same code with the same mistake.
I mean those black connector strips with pin sockets in which you stick the jumper wires.
When you look at the backside of the Arduino board, there could be bad soldering or solder blobs and shortcuts. Since it is a official Arduino board, I assume the quality is good 
If those black connector strips have not been bent and the onboard led is working, then I assume that your Arduino board is 100% okay. Everything around it could be bad.
Can you check the breadboard and the jumper wires. Breadboards can have bad contacts and jumper wires can be broken. This happens quite a lot.
1 Like
Tried again with this,didn't work though
Bought a new Arduino. On-board LED is working well. The connector strips are good to use. I connected a battery to breadboard and LED parallel to it. It lit. However, when I connect battery to the side strips of breadboard and then a jumper wire from side strips the the LED, it doesn’t work. Pin 13 at HIGH(measured using multimeter) and LED connected directly to it(not using a breadboard),doesn’t work too.
Please help!
Some breadboards have a break in the side rails. Try your battery with leads close to where the power connects to the breadboard.
1 Like