MQ-7 "flying fish" heating cycle

I wonder why the writer from that article didn't use a 82ohm resistor across the transistor to get that 1.4volt across the sensor. That should have been a lot easier than using PWM, smoothing caps, and oversampling.
The 82ohm resistor only dissipates ~150mW at that current (~42mA), so a common 1/4watt metalfilm would have been ok.
1k base resistor (4.3mA) won't fully saturate a medium power (2N2222) TO-92 transistor @150mA.
Lower to 330ohm or 470ohm if you want (almost) the full 5volt on the sensor. Or use a logic level mosfet.
Leo..