Atmega328p (For the love of satan, someone got a clue?)

Is there some s*** bug with arduino software or something?
Doesnt matter 1 tit what i try to use as a input/data pin for RPM reading of a fan..
I can upload with a bogus pin as rpm, still it will only read from pin 2 (4th from top left on 328p)

#include <FanSpeed.h>

/* Output Variables */
int FS_RPM_1 = 0;

/* Input Variables */
int FS_PIN_1 = 9; // I would fucking assume this meant digital 9....

/* FanSpeed PWM/RPM */
FanSpeedInt FS_FAN_1(FS_PIN_1, false);
long FS_LastUpdate = 0;

void FanSpeed_RPM() {
    FS_FAN_1.process();
}

void FanSpeed_Update() {
  if (millis() - FS_LastUpdate > 1000) {
    FS_LastUpdate = millis(); 
    FS_RPM_1 = FS_FAN_1.counter*30;
    FS_FAN_1.reset();
  }
}

void FanSpeed_Setup() {
    attachInterrupt(0, FanSpeed_RPM, RISING);
}

void setup() {
    FanSpeed_Setup();
    Serial.begin(9600);    
}

void loop() {
    FanSpeed_Update();
    Serial.print("RPM: ");
    Serial.println(FS_RPM_1);
    delay(500);
}

There are evidently two different pins involved in this code:

lombriz:

    attachInterrupt(0, FanSpeed_RPM, RISING);

This code causes FanSpeed_RPM() to be called whenever pin 2 (interrupt 0) goes from LOW to HIGH. For more information, see:

Note that it's recommended to use digitalPinToInterrupt() rather than just specifying the interrupt number directly in attachInterrupt(). That, in addition to not using a magic number for the interrupt pin likely would have prevented all your confusion.

pert:
There are evidently two different pins involved in this code:This code causes FanSpeed_RPM() to be called whenever pin 2 (interrupt 0) goes from LOW to HIGH. For more information, see:
attachInterrupt() - Arduino Reference
Note that it's recommended to use digitalPinToInterrupt() rather than just specifying the interrupt number directly in attachInterrupt(). That, in addition to not using a magic number for the interrupt pin likely would have prevented all your confusion.

Oh boy, gonna shoot myself with a gluegun.

Never realized the first variable passed to attachInterrupt() was the actual interrupt reference.
So much for "tweaking".

Thank you a whole bag full of happy, pert!

Yes, tools can have bugs. But, a smart programming always looks first to his own code for the problem before trying to pin it on the toolchain.

It’s a poor craftsman that blames his tools.

From the reference:

attachInterrupt(digitalPinToInterrupt(pin), ISR, mode);	(recommended)

So

    attachInterrupt(digitalPinToInterrupt(FS_PIN_1), FanSpeed_RPM, RISING);

would be the best way to code this, but doesn't help you discover that pin 9 isn't an interrupt pin...

but doesn't help you discover that pin 9 isn't an interrupt pin...

but reading the reference page for attachInterrupt() would...