Сбор информации о погодных условиях

Dependencies:   RF24 USBDevice mbed

main.cpp

Committer:
pro100kot14
Date:
2015-10-19
Revision:
1:8766173d267f
Parent:
0:1e03d2cd238f
Child:
2:ad2653bcf93f

File content as of revision 1:8766173d267f:

#include "mbed.h"
#include "USBSerial.h"
#include "ThermometerTmp36.h"
#include "Thermistor.h"

USBSerial pc;
AnalogIn   tmp36(A0);
AnalogIn   thermist(A2);

int main() {
    ThermometerTmp36 termTmp36(tmp36);
    Thermistor term503(thermist, 0.001995, 0.00007997, 0.0000003863);
    term503.setError(-5000);
    while(1) {
        pc.printf("TMP36: %f degC\tTermistor: %f degC\r\n", termTmp36.getTemperature(), term503.getTemperature());
        wait(1);
    }
}