Data logger program for onboard LM758 temp sensor

Dependencies:   mbed C12832 LM75B

Files at this revision

API Documentation at this revision

Comitter:
saltire78
Date:
Sat Dec 05 16:39:35 2020 +0000
Parent:
6:a198730290d9
Commit message:
.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r a198730290d9 -r dc30e0495898 main.cpp
--- a/main.cpp	Sat Dec 05 12:59:33 2020 +0000
+++ b/main.cpp	Sat Dec 05 16:39:35 2020 +0000
@@ -36,7 +36,7 @@
 
                 /* attempt to record an average temperature over a defined period to local memory - in this case every minute.
                 FILE*fp = fopen("/local/avgTemp.txt", "a");                     // direct to txt file in local memory
-                fprintf(fp, avgTemp);                                           // attempt to write average temp to local flash (does not work! - looking for string. Putc also doesn't work)
+                fprintf(fp,"%.5f\n", avgTemp);                                  // attempt to write average temp to local flash (does not work! - looking for string. Putc also doesn't work)
                 fclose(fp);                                                     // close the file
                 */