Pablo Lopez
/
MQ-135PROGRAMA
ffff
main.cpp
- Committer:
- pablolopez89
- Date:
- 2019-05-12
- Revision:
- 1:694ec02995df
- Parent:
- 0:cd033d9f7ce6
File content as of revision 1:694ec02995df:
#include "mbed.h" DigitalOut myled1(LED1); DigitalOut myled2(LED2); //DigitalOut heat(PA_10); AnalogIn sensor(PA_0); Serial pc(USBTX, USBRX); //For raw data int main(void) { while(1) { myled1 = 1; // heat = 1; printf("Sensor: %f\n\r", sensor.read()*5); wait(1.0); //myled1 = 0; //heat = 0; //wait(0.5); } }