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.
Fork of frdm_https_HPM by
Main.cpp
00001 #include "mbed.h" 00002 #include "HPM.h" 00003 00004 #define TESTER_VERSION 1.0 00005 00006 Serial pc(USBTX, USBRX, 115200); 00007 00008 #if MODE == 4 00009 RawSerial link(D0, D1); 00010 #endif 00011 00012 main() 00013 { 00014 pc.printf("Starting HPM library Tester Version %s\n", TESTER_VERSION); 00015 #if MODE == 4 00016 HPM pm(&link); 00017 #else 00018 HPM pm(D1, D0); //Create an instance of a HPM class object 00019 #endif 00020 pm.setLog(&pc); //Attach a log output stream 00021 pm.startAutoRead(); //Start the sensor in continous read mode 00022 for(int index = 0; index < 5; index++) { //Display 5 readings 00023 pm.getPMReadings(); 00024 } 00025 pm.stopAutoRead(); //Shut the sensor down 00026 00027 } 00028
Generated on Mon Jul 18 2022 22:46:57 by
1.7.2
