F
Dependencies: mbed Sht31 MAX44009
Revision 13:7da5ad2bd3c6, committed 2020-05-01
- Comitter:
- chapman515
- Date:
- Fri May 01 13:12:13 2020 +0000
- Parent:
- 12:5a140bcc456f
- Child:
- 14:5cb0c238fbc8
- Commit message:
- hgjuhg
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Apr 25 06:41:27 2020 +0000
+++ b/main.cpp Fri May 01 13:12:13 2020 +0000
@@ -51,12 +51,12 @@
bool wrote=false;
DigitalOut led(LED1);
-char signal[1];
+char signal;
//LocalFileSystem local("local"); //Create the local filesystem under the name "local"
void letsee() {
- led=!led;
- pc.scanf("%1s", signal);
+ signal = pc.getc();
+ led = !led;
wrote=true;
}
@@ -251,9 +251,9 @@
_30Scounter++;
allfilled = true;
}
- BLE_Can_receive = 1;
+ //BLE_Can_receive = 1;
if (wrote){
- if (signal[0]=='s'){
+ if (signal=='s'){
for (int i=0;i <=sleepDataPos;i++){
if (i==sleepDataPos){
wait_ms(500);
@@ -273,11 +273,11 @@
sendCounter++;
pc.printf("%d,%d,%d,%d,%d,%3.2f,%3.2f%,%0.001f,%f\n",sendCounter,(int)(RGBavg.C+0.5), (int)(RGBavg.R+0.5), (int)(RGBavg.G+0.5), (int)(RGBavg.B+0.5),THavg.t, THavg.h,luxavg,second);
if (sendCounter == 10){ //10 = all element is filled {
- if (signal[0]=='i'){
+ if (signal=='i'){
wait_ms(500);
pc.printf("end");
}
- else if (signal[0]=='a')
+ else if (signal=='a')
{
wait_ms(500);
pc.printf("aend");