Grove Air quality sensor program
Dependencies: Grove_Air_Quality_Sensor_Library mbed
Connection
VDD → 3.3V or 5V (supply voltage)
GND → GND
SIG → p15 (mbed)
NC → Non connection
main.cpp
- Committer:
- mbedAustin
- Date:
- 2014-09-05
- Revision:
- 0:2dbce8e35862
- Child:
- 1:888328032581
File content as of revision 0:2dbce8e35862:
#include "mbed.h" AnalogIn sensor(A0); int main() { float sensorValue; while (true) { sensorValue = sensor.read(); printf("\r Air Quality score = %3.2f",100 - (sensorValue*100)); wait(5); } }