pulseIn retuns zero every second time called

J-M-L:
how do you power your mh-z19 co2 sensor?

On a M0 you can get 7mA as maximum DC current for I/O pins versus a maximum of 40mA (which you should limit to 20mA in practice) on your proMini. The mh-z19 co2 sensor requires roughly 18mA so can be powered from a digital pin of the pro-Mini but not from the M0.

could that be this?

(of course you don't need the logic level shifter on the M0 as it operates at 3.3V logic as well)

No, i use a 3a 5v power supply to power everything seperately, the co2 sensor is not powered from the m0. currently i have a second 3.3v power supply to power the m0 as well (power in on the 3.3v pin, not Vin since I am already regulating it)

*edit
just tried using an interrupt instead of pulseIn and it works fine. would still like to get pulseIn working though as there is no need to have an interrupt continuously running.