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.
Dependents: 3_test_EEROMM-barometer 5_waitmode 5_flightmode 5-2_thrustermode ... more
LPS33HW.h
- Committer:
- sasakisho
- Date:
- 2020-07-20
- Revision:
- 1:9574dea45061
- Parent:
- 0:efb4130c9550
File content as of revision 1:9574dea45061:
#ifndef MBED_LPS33HW_H #define MBED_LPS33HW_H #include "mbed.h" //LPS33HW slave address #define SL_add 0xB8 #define SH_add 0xBA //Check adress #define WHO_AM_I 0x0F //CTRL_REG1 #define CTRL_REG1 0x10 //Start Up #define Normal 0x10 //normal(1Hz) #define High_rate 0x50 //High rate(75Hz) //data register #define press_msb 0x2A #define press_lsb 0x29 #define press_xlsb 0x28 class LPS33HW { public: LPS33HW(PinName sda,PinName scl); ~LPS33HW(); char read(char regist); //基本read関数 void write(char regist,char data); //基本write関数 char who(); //WHO_AM_I void start(char mode); //Start,mode0;normal,mode1;high rate double data_read(); //pressure read private: I2C i2c; char addr; }; #endif