Test firmware for the Supermote hardware.
Dependencies: K30_I2C libxDot-mbed5
Fork of K30_I2C_Program by
HPM/hpm.h@2:680fc2690d10, 2018-09-07 (annotated)
- Committer:
- bjenkins
- Date:
- Fri Sep 07 02:54:05 2018 +0000
- Revision:
- 2:680fc2690d10
- Child:
- 3:2ab969b31f6b
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bjenkins | 2:680fc2690d10 | 1 | #ifndef HPM_h |
bjenkins | 2:680fc2690d10 | 2 | #define HPM_h |
bjenkins | 2:680fc2690d10 | 3 | |
bjenkins | 2:680fc2690d10 | 4 | #include "mbed.h" |
bjenkins | 2:680fc2690d10 | 5 | |
bjenkins | 2:680fc2690d10 | 6 | class HPM |
bjenkins | 2:680fc2690d10 | 7 | { |
bjenkins | 2:680fc2690d10 | 8 | public: |
bjenkins | 2:680fc2690d10 | 9 | HPM(Serial* device, Serial* debug); |
bjenkins | 2:680fc2690d10 | 10 | bool init(void); |
bjenkins | 2:680fc2690d10 | 11 | bool start_measurement(void); |
bjenkins | 2:680fc2690d10 | 12 | bool stop_measurement(void); |
bjenkins | 2:680fc2690d10 | 13 | bool read_measurement (long int &PM25, long int &PM10); |
bjenkins | 2:680fc2690d10 | 14 | bool stop_autosend(void); |
bjenkins | 2:680fc2690d10 | 15 | bool start_autosend(void); |
bjenkins | 2:680fc2690d10 | 16 | |
bjenkins | 2:680fc2690d10 | 17 | private: |
bjenkins | 2:680fc2690d10 | 18 | Serial* _device; |
bjenkins | 2:680fc2690d10 | 19 | Serial* _debug; |
bjenkins | 2:680fc2690d10 | 20 | //long int _PM25; |
bjenkins | 2:680fc2690d10 | 21 | //long int _PM10; |
bjenkins | 2:680fc2690d10 | 22 | }; |
bjenkins | 2:680fc2690d10 | 23 | |
bjenkins | 2:680fc2690d10 | 24 | #endif |