ESP32 12V PC 4 Pin Fan Tachometer reading that works

There are numerous guides to controlling a 4 pin PC fan with an Arduino and ESP32. None of them worked to read the tachometer correctly for me with a Noctua NF12 fan. The issue is that the spec for the tachometer (Pin 3) is that it be pulled up to 12 Volts with a maximum current of 5mA. This is the Reference for this from Intel, you will find the 12Volt requirement at the start of section 2. We…