Projetc1
- include "mbed.h"
- ifndef DFRobot_LIS2DH12_h
- define DFRobot_LIS2DH12_h
- include <stdlib.h>
- include <stdint.h>
- define LIS2DH12_RANGE_2GA 0x00
- define LIS2DH12_RANGE_4GA 0x10
- define LIS2DH12_RANGE_8GA 0x20
- define LIS2DH12_RANGE_16GA 0x30
class DFRobot_LIS2DH12 { public: static uint8_t sensorAddress; /< IIC address of the sensor int8_t init(uint8_t range); /< Initialization function void readXYZ(int16_t&, int16_t&, int16_t&); /< read x, y, z data void mgScale(int16_t&, int16_t&, int16_t&); /< transform data to millig /*!
- Through the I2C to specify register read a single data
- / uint8_t readReg(uint8_t); /*!
- Through the I2C to specify register read more data
- / void readReg(uint8_t, uint8_t *, uint8_t, bool autoIncrement = true); /*!
Changes
Revision | Date | Who | Commit message |
---|