Сбор информации о погодных условиях
Dependencies: RF24 USBDevice mbed
Diff: main.cpp
- Revision:
- 1:8766173d267f
- Parent:
- 0:1e03d2cd238f
- Child:
- 2:ad2653bcf93f
--- a/main.cpp Sat Oct 17 17:14:48 2015 +0000 +++ b/main.cpp Mon Oct 19 22:03:12 2015 +0000 @@ -1,15 +1,18 @@ #include "mbed.h" #include "USBSerial.h" -#include <math.h> #include "ThermometerTmp36.h" +#include "Thermistor.h" USBSerial pc; -AnalogIn ain(A0); +AnalogIn tmp36(A0); +AnalogIn thermist(A2); int main() { -ThermometerTmp36 term(ain); + ThermometerTmp36 termTmp36(tmp36); + Thermistor term503(thermist, 0.001995, 0.00007997, 0.0000003863); + term503.setError(-5000); while(1) { - pc.printf("temperatureC: %f\r\n",term.getTemperature()); + pc.printf("TMP36: %f degC\tTermistor: %f degC\r\n", termTmp36.getTemperature(), term503.getTemperature()); wait(1); } }