![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Dust Sesnsor PMS5003
Dependencies: DustSenzor NetServices ThingSpeakEthernet mbed
Fork of PMS5003 by
Diff: main.cpp
- Revision:
- 13:5c98f1d10e70
- Parent:
- 12:df83e01db08e
- Child:
- 14:48368d18a793
--- a/main.cpp Thu Jun 08 18:28:54 2017 +0000 +++ b/main.cpp Tue Jun 13 19:15:58 2017 +0000 @@ -12,7 +12,7 @@ int main() { ds.stop(); float *ptr; - + float values [6]; ts.connect(); wait(1); while(1){ @@ -23,7 +23,8 @@ while( res == 1){ ptr = ds.read(); for( int i = 0; i < 6; i++) { - ts.setField(*(ptr + i), i+1); + values[i] = *(ptr + i) ; + ts.setField ( values[i]*10000, i+1 ); } ts.putUp(); wait(15);