ffff

Dependencies:   mbed

main.cpp

Committer:
Tuxitheone
Date:
2016-09-23
Revision:
0:cd033d9f7ce6
Child:
1:694ec02995df

File content as of revision 0:cd033d9f7ce6:

#include "mbed.h"
#include "mq135.h"

DigitalOut myled1(LED1);
DigitalOut myled2(LED2);
DigitalOut heat(p21);

AnalogIn sensor(p19);
Serial pc(USBTX, USBRX); //For raw data


int main(void)
{
    while(1) {
    myled1 = 1;
    heat = 1;
    printf("Sensor: %f\n\r", sensor.read()*3.3)-0,4919879;

        wait(2.0);
    myled1 = 0;
    heat = 0;
        wait(0.5);
    }
}