Pablo Lopez
/
MQ-135PROGRAMA
ffff
Diff: main.cpp
- Revision:
- 1:694ec02995df
- Parent:
- 0:cd033d9f7ce6
--- a/main.cpp Fri Sep 23 19:43:30 2016 +0000 +++ b/main.cpp Sun May 12 02:11:06 2019 +0000 @@ -1,11 +1,11 @@ #include "mbed.h" -#include "mq135.h" + DigitalOut myled1(LED1); DigitalOut myled2(LED2); -DigitalOut heat(p21); +//DigitalOut heat(PA_10); -AnalogIn sensor(p19); +AnalogIn sensor(PA_0); Serial pc(USBTX, USBRX); //For raw data @@ -13,12 +13,12 @@ { while(1) { myled1 = 1; - heat = 1; - printf("Sensor: %f\n\r", sensor.read()*3.3)-0,4919879; + // heat = 1; + printf("Sensor: %f\n\r", sensor.read()*5); - wait(2.0); - myled1 = 0; - heat = 0; - wait(0.5); + wait(1.0); + //myled1 = 0; + //heat = 0; + //wait(0.5); } }