This library enables users to communicate with the ADXL345 accelerometer through the I2C bus on the mbed. The API names are similar and work nearly the same way as those made in the SPI libraries for the ADXL345.
Dependencies: mbed
Diff: ADXL345_I2C.h
- Revision:
- 3:d030b74d1d71
- Parent:
- 1:d9412b56f98a
--- a/ADXL345_I2C.h Wed May 08 21:07:31 2019 +0000 +++ b/ADXL345_I2C.h Fri May 24 14:36:05 2019 +0000 @@ -55,6 +55,9 @@ * Includes */ #include "mbed.h" +#include "math.h" +#include "string" +#include "sstream" /** * Defines @@ -125,6 +128,17 @@ +#define EEPROM_READ 0xA6 +#define EEPROM_WRITE 0XA7 + +#define LCD 0x50 +#define LCD_ON 0x41 +#define LCD_OFF 0x42 +#define LCD_CURSOR 0X45 +#define LCD_CLEAR 0x51 +#define LCD_CMD 0xFE + + @@ -148,6 +162,11 @@ */ void getOutput(int* readings); + void writeEEPROM(char *data, uint8_t lenght); + + //LCD + void LCDprint(float Xaxes, float Yaxes, float Zaxes); + /** * Read the device ID register on the device. *