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 Austin Blackstone

Committer:
mbedAustin
Date:
Fri Sep 05 01:19:45 2014 +0000
Revision:
0:cb8c67a714da
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

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbedAustin 0:cb8c67a714da 1 #include "mbed.h"
mbedAustin 0:cb8c67a714da 2
mbedAustin 0:cb8c67a714da 3 AnalogIn sensor(A1);
mbedAustin 0:cb8c67a714da 4
mbedAustin 0:cb8c67a714da 5 int main()
mbedAustin 0:cb8c67a714da 6 {
mbedAustin 0:cb8c67a714da 7 float sensorValue;
mbedAustin 0:cb8c67a714da 8 while(1) {
mbedAustin 0:cb8c67a714da 9 sensorValue = sensor.read(); // returns voltage between 0 -> 1
mbedAustin 0:cb8c67a714da 10 printf("%f percent\n\r",sensorValue*100);
mbedAustin 0:cb8c67a714da 11 wait(1);
mbedAustin 0:cb8c67a714da 12 }
mbedAustin 0:cb8c67a714da 13 }
mbedAustin 0:cb8c67a714da 14
mbedAustin 0:cb8c67a714da 15 // for more detailed code see http://www.seeedstudio.com/wiki/Grove_-_HCHO_Sensor