zeus 3110
/
MH-Z19_Test
CO2 Sensor MH-Z19 Class (uses interrupt input as PWM input)
main.cpp
- Committer:
- zeus3110
- Date:
- 2016-08-11
- Revision:
- 0:3c154d34f47e
File content as of revision 0:3c154d34f47e:
#include "mbed.h" #include "MH_Z19.h" DigitalOut myled(LED1); MH_Z19 Sen(p5); int main() { wait(2); while(1) { myled = 1; wait(0.2); myled = 0; printf("CO2 PPM:%d\n",Sen.ReadCO2PPM()); wait(1.8); } }