Grove HCHO Sensor example Model:SEN01500P Operating Voltage: 5.0V ± 0.3V Target Gases: HCHO, Benzene,Toluene,Alcohol Concentration Range: 1~50 ppm Sensor Resistance Value(Rs): 10KΩ-100KΩ(in 10ppm HCHO) Sensitivity: Rs(in air)/Rs(10ppm HCHO)≥5 http://www.seeedstudio.com/wiki/Grove_-_HCHO_Sensor
Dependencies: mbed
Fork of Seeed_Grove_HCHO_Sensor_Example by
Revision 0:cb8c67a714da, committed 2014-09-05
- Comitter:
- mbedAustin
- Date:
- Fri Sep 05 01:19:45 2014 +0000
- Commit message:
- Grove HCHO sensor example. Very simple, grabs value from sensor and converts to percentage. Should come back later and add to it using the process outlined here http://www.seeedstudio.com/wiki/Grove_-_HCHO_Sensor
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r cb8c67a714da main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Sep 05 01:19:45 2014 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" + +AnalogIn sensor(A1); + +int main() +{ + float sensorValue; + while(1) { + sensorValue = sensor.read(); // returns voltage between 0 -> 1 + printf("%f percent\n\r",sensorValue*100); + wait(1); + } +} + +// for more detailed code see http://www.seeedstudio.com/wiki/Grove_-_HCHO_Sensor \ No newline at end of file
diff -r 000000000000 -r cb8c67a714da mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Sep 05 01:19:45 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013 \ No newline at end of file