# Arduino Nano pins are always high

i started to build an infrared transmitter (commander). I use 4 pushbuttons for left, right, up, down. These buttons are pulling down when pressed. I used internal pullup resistors. My prboblem is that the arduino is seeing one pin as high (not changeable by pressing button) and the other pins as low (not changeable by pressing buttons). It is not recognizing the changes.

I tried the following to solve:

• First i used Pulldowns and the result was the same. Then i searched for an alternative and found pullupp. The same Problem.
• I tried other pins. Same Problem.
• Checked the soldering connections. Everything is OK.
• Then i measured the voltages for the first pin. When nothing is pressed the voltage between pin A0 and Ground is 0V and when pressed the voltage between pin A0 and Ground is 0V.
• I took external resistor (1k) instead of internal pullup. Know the probelm with the single one is solved. The voltages when pressed and not pressed are OK. But the controller pins are not recognizing the changes.

The last point is very strange i expected 5V when not pressed and 0V when pressed.

Here is my code:

    #include <IRremote.h>
#include <IRremoteInt.h>

IRsend irsend;

// The configuration of the output pin will be made by the library
// The output pin is a different one for different arduinos
// Arduino UNO:  Output = D3
// Arduino MEGA: Output = D9
// You will find a full list of output pins on the website:
// http://z3t0.github.io/Arduino-IRremote/

#define TASTE_HOCH 19       //A0
#define TASTE_RECHTS 22     //A3
#define TASTE_UNTEN 21      //A2

int aktiveTaste = 0;        //Taste die momentan gedrückt ist

void setup()
{
pinMode(TASTE_HOCH, INPUT_PULLUP);
pinMode(TASTE_RECHTS, INPUT_PULLUP);
pinMode(TASTE_UNTEN, INPUT_PULLUP);

Serial.begin(9600);
}

// main program loop
void loop() {

Serial.print("TASTE_HOCH: ");

Serial.print("TASTE_RECHTS: ");

Serial.print("TASTE_UNTEN: ");

delay(3000);

aktiveTaste = 1;
}
aktiveTaste = 2;
}
aktiveTaste = 3;
}
aktiveTaste = 4;
}

if(aktiveTaste > 0){

// The transmitter sends in this example the signal A90 (hex. dezimal   form) in the encoding "RC5"
// It will be transmitted 3 times after that it will make a 5 second break
for (int i = 0; i < 3; i++) {
irsend.sendRC5(aktiveTaste, 12); // [0xA90] signal | [12] Bit-length signal (hex A90=1010 1001 0000)
delay(40);
}

aktiveTaste = 0;                    //Keine Taste gedrückt
}
}


And This is the output of serial print:

What is the cause for not recognizing changes?

• I don't own a nano, but if I'm not mistaken there's a mismatch between the pin numbers of your code and the actual pinout: pighixxx.com/test/pinouts/boards/nano.pdf 19 is A5 actually etc. Can you post photos / schematic of the actual wiring? Apr 11 '18 at 10:40
• The numbers are diffrent. I used a picture from the internet. This is the link: google.de/…: Apr 11 '18 at 10:44

i solved my problem. After the comment from idfka I realised that the pins of the nano boards are manufacturer specific. My board is this one: https://www.google.de/search?q=arduino+nano+pins&client=firefox-b&dcr=0&tbm=isch&source=iu&ictx=1&fir=g5a8iQQg303lcM%253A%252Ctmj5jJzH5Ig2qM%252C_&usg=__72_pjW6IJT1IOYTAo5yM4-X_zkA%3D&sa=X&ved=0ahUKEwiIlKX7hbLaAhXBJVAKHWHxC_EQ9QEILjAB#imgrc=uEf4hxPbfX8vZM:

Before that i used the numbers for the pins from this one: https://www.google.de/search?q=arduino+nano+pins&client=firefox-b&dcr=0&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiIlKX7hbLaAhXBJVAKHWHxC_EQ_AUICygC&biw=1920&bih=954#imgrc=AJV5mxdwaZYG6M:

And this is from idkfa: http://www.pighixxx.com/test/pinouts/boards/nano.pdf

I never thought that different manufacuters will use different pins.

#define TASTE_HOCH 14       //A0
#define TASTE_RECHTS 17     //A3
#define TASTE_UNTEN 16      //A2


The change of the numbers solved my problem.