Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: RF24 USBDevice mbed
Diff: main.cpp
- Revision:
- 1:8766173d267f
- Parent:
- 0:1e03d2cd238f
- Child:
- 2:ad2653bcf93f
diff -r 1e03d2cd238f -r 8766173d267f main.cpp
--- 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);
}
}