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.
BAROMETER.h@3:f7beb1c93ba8, 2020-06-29 (annotated)
- Committer:
- rary
- Date:
- Mon Jun 29 06:50:06 2020 +0000
- Revision:
- 3:f7beb1c93ba8
- Parent:
- 1:7badb569b734
finish practice
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rary | 3:f7beb1c93ba8 | 1 | #ifndef MBED_BAROMETER_H |
rary | 1:7badb569b734 | 2 | #define MBED_BAROMETER_H |
rary | 1:7badb569b734 | 3 | |
rary | 1:7badb569b734 | 4 | #include "mbed.h" |
rary | 1:7badb569b734 | 5 | |
rary | 1:7badb569b734 | 6 | class BAROMETER |
rary | 1:7badb569b734 | 7 | { |
rary | 1:7badb569b734 | 8 | public: |
rary | 3:f7beb1c93ba8 | 9 | BAROMETER(PinName sda, PinName scl, char adress = 0xB8); |
rary | 1:7badb569b734 | 10 | ~BAROMETER(); |
rary | 1:7badb569b734 | 11 | |
rary | 1:7badb569b734 | 12 | char i2c_read(char regist); |
rary | 1:7badb569b734 | 13 | void i2c_write(char regist,char data); |
rary | 1:7badb569b734 | 14 | |
rary | 1:7badb569b734 | 15 | private: |
rary | 3:f7beb1c93ba8 | 16 | I2C i2c; |
rary | 1:7badb569b734 | 17 | char _addr; |
rary | 1:7badb569b734 | 18 | |
rary | 1:7badb569b734 | 19 | }; |
rary | 1:7badb569b734 | 20 | |
rary | 1:7badb569b734 | 21 | #endif |