Code works perfectly with uno board, but not with nano board?

Hey guys,

I was wondering if anyone knows about arduino nano boards not allowing a voltage to be sent to more than one digital output pin at a time?

I have used exactly the same code on an Uno board, and it performs perfectly. However, when I upload it to the nano board (which has the same processor ATmega 328P), it will not perform sections of the code which contain voltage being sent to more than one output pin at a time.

Instead, at these moments where I want pin 5 & 6 to be receiving an output voltage, something different to the code happens instead (eg. only pin 5 receives the voltage, or neither of them do).

P.S. Im an artist who has recently started using arduino in my work, and am fairly new to arduino.I hope I'm not missing something really obvious here, but have racked by brain trying to figure it out.

Heres the code I am using.

void setup() {
  pinMode(5, OUTPUT); //sets the digital pin 5 as output
  pinMode(6, OUTPUT); //sets the digital pin 6 as output
  pinMode(7, OUTPUT); //sets the digital pin 7 as output


// the loop function runs over and over again forever
void loop() {
  digitalWrite(5, HIGH);
  digitalWrite(6, HIGH);
  digitalWrite(5, LOW);
  digitalWrite(6, LOW);
  digitalWrite(5, HIGH);
  digitalWrite(7, HIGH);
  digitalWrite(5, LOW);
  digitalWrite(7, LOW);

any suggestions would be much appreciated!


There is no reason for your code not to work.

How do you know the pins do not take the right value? What is connected to the PINS? are you trying to draw too much current from your pins?

Is your nano 5V or3.3V ?

Did you solder wires to the Nano, or did you add header pins? Either way, did you actually solder to the board?


Thanks for your replies guys! I actually just figured it out - after scouring the nano diagrams I realised I made a silly mistake with my wiring!