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: ATParser TSL2561 mbed
Diff: main.cpp
- Revision:
- 2:8a192ca34bac
- Parent:
- 1:62d78e5748b6
- Child:
- 3:9d465264c741
--- a/main.cpp Tue Apr 17 13:48:34 2018 +0000
+++ b/main.cpp Wed Apr 18 14:23:01 2018 +0000
@@ -52,12 +52,12 @@
while(1)
{
float lightnum = lightsensor.lux();
- //pc.printf("light = %f\n\r", lightnum);
+ pc.printf("light = %.5f\n\r", lightnum);
//char light = malloc(10);
//light = new char [8];
day[i] = new char[8];
int n;
- n = sprintf(day[i], "%f", lightnum);
+ n = sprintf(day[i], "%.5f", lightnum);
//pc.printf("String transfer worked: %s\n\r", day[i]);
i++;
if (i == 24)
@@ -81,6 +81,6 @@
}
}
- wait(3600);
+ wait(2);
}
}