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
Diff: co2.h
- Revision:
- 1:af991edb6dc1
- Parent:
- 0:958e045ea7d1
diff -r 958e045ea7d1 -r af991edb6dc1 co2.h
--- a/co2.h Fri Mar 22 10:31:21 2019 +0000
+++ b/co2.h Thu Jul 04 09:09:54 2019 +0000
@@ -1,6 +1,6 @@
#include "mbed.h"
-Serial co2(D1,D0);
+Serial co2(D1,D0); //USED IN MAIN
int value;
@@ -24,8 +24,8 @@
count++;
}
- if(count>=5) {
- value = ((co2_measure[1]-'0')*100000+co2_measure[2]-'0')*10000+(co2_measure[3]-'0')*1000+(co2_measure[4]-'0')*100;
+ if(count>=6) { //NOT SURE IF 5 OR 6
+ value = ((co2_measure[0]-'0')*100000+co2_measure[1]-'0')*10000+(co2_measure[2]-'0')*1000+(co2_measure[3]-'0')*100;
count=0;
allow=false;
return value;