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
main.cpp
00001 #include "mbed.h" 00002 #include "mq135.h" 00003 00004 DigitalOut myled1(LED1); 00005 DigitalOut myled2(LED2); 00006 DigitalOut heat(p21); 00007 00008 AnalogIn sensor(p19); 00009 Serial pc(USBTX, USBRX); //For raw data 00010 00011 00012 int main(void) 00013 { 00014 while(1) { 00015 myled1 = 1; 00016 heat = 1; 00017 printf("Sensor: %f\n\r", sensor.read()*3.3)-0,4919879; 00018 00019 wait(2.0); 00020 myled1 = 0; 00021 heat = 0; 00022 wait(0.5); 00023 } 00024 }
Generated on Tue Jul 12 2022 18:11:52 by
1.7.2