You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using EnableInterrupt for tracking the tacho pulse on several PWM controlled 4 pin PC fans - 13 fans in total split over three nanos.
Originally I was using pin 2 for one of the signals, however it was consistently reading in the region of 8 times higher than the actual fan speed. This happened on all three nanos and regardless of if I swapped the fans around.
Each of the fans were wired up the same and each used the same function provided to the enableInterrupt call (counting on falling edge):
void fanSpeedCount(){
int fan = pin_to_fan[arduinoInterruptedPin];
fan_times[fan][fan_next_data[fan]] = millis();
fan_next_data[fan] = (fan_next_data[fan] + 1) % FAN_DATA_POINTS;
}
I've solved this for myself by rewiring and not using pin 2 - my suspicion is it is related to pin 2 being a hardware interrupt pin and I didn't really want to get into debugging it beyond that.
The text was updated successfully, but these errors were encountered:
Hi,
I'm using EnableInterrupt for tracking the tacho pulse on several PWM controlled 4 pin PC fans - 13 fans in total split over three nanos.
Originally I was using pin 2 for one of the signals, however it was consistently reading in the region of 8 times higher than the actual fan speed. This happened on all three nanos and regardless of if I swapped the fans around.
Each of the fans were wired up the same and each used the same function provided to the enableInterrupt call (counting on falling edge):
I've solved this for myself by rewiring and not using pin 2 - my suspicion is it is related to pin 2 being a hardware interrupt pin and I didn't really want to get into debugging it beyond that.
The text was updated successfully, but these errors were encountered: