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: mbed Sht31 MAX44009
Revision 14:5cb0c238fbc8, committed 2020-05-15
- Comitter:
- kentwong
- Date:
- Fri May 15 07:57:21 2020 +0000
- Parent:
- 13:7da5ad2bd3c6
- Commit message:
- Final
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri May 01 13:12:13 2020 +0000
+++ b/main.cpp Fri May 15 07:57:21 2020 +0000
@@ -65,7 +65,7 @@
int main()
{
- set_time(1587744159);
+ set_time(1587841830);
led=1;
//pc.read
@@ -237,7 +237,7 @@
BLE_Can_receive = 0;
counter++;
- if (counter == 10 &&_30Scounter==0){
+ if (counter >0&&_30Scounter==0){
_30Scounter=0;
// pc.printf("%u,%u\n",(unsigned short)(luxavg*1000),(unsigned short)(second*1000));
sleepData[sleepDataPos].timestamp=(int)seconds;
@@ -254,6 +254,8 @@
//BLE_Can_receive = 1;
if (wrote){
if (signal=='s'){
+ pc.printf("\"sleep\",");
+ wait_ms(500);
for (int i=0;i <=sleepDataPos;i++){
if (i==sleepDataPos){
wait_ms(500);
@@ -262,7 +264,7 @@
else {
float tempL=sleepData[i].light/1000.0f;
float tempN=sleepData[i].noise/1000.0f;
- pc.printf("[\"%d\",\"%f\",\"%f\"],",sleepData[i].timestamp,tempL,tempN);
+ pc.printf("[%d,%f,%f],",sleepData[i].timestamp,tempL,tempN);
}
}
sleepDataPos=0;