Skip to content

Commit 0b42933

Browse files
authored
Merge pull request #1 from cparata/master
First Release of LIS3DHH
2 parents 9b634ac + 1c6e9c9 commit 0b42933

File tree

7 files changed

+2586
-0
lines changed

7 files changed

+2586
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,30 @@
11
# LIS3DHH
22
Arduino library to support the LIS3DHH 3D accelerometer
3+
4+
## API
5+
6+
This sensor uses SPI to communicate.
7+
8+
For SPI it is then required to create a SPI interface before accessing to the sensors:
9+
10+
dev_spi = new SPIClass(SPI_MOSI, SPI_MISO, SPI_SCK);
11+
dev_spi->begin();
12+
13+
An instance can be created and enabled when the SPI bus is used following the procedure below:
14+
15+
Accelero = new LIS3DHHSensor(dev_spi, CS_PIN);
16+
Accelero->Enable_X();
17+
18+
The access to the sensor values is done as explained below:
19+
20+
Read accelerometer.
21+
22+
Accelero->Get_X_Axes(&accelerometer);
23+
24+
## Documentation
25+
26+
You can find the source files at
27+
https://github.com/stm32duino/LIS3DHH
28+
29+
The LIS3DHH datasheet is available at
30+
https://www.st.com/content/st_com/en/products/mems-and-sensors/accelerometers/lis3dhh.html

keywords.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#######################################
2+
# Syntax Coloring Map For LIS3DHH
3+
#######################################
4+
5+
#######################################
6+
# Datatypes (KEYWORD1)
7+
#######################################
8+
9+
LIS3DHHSensor KEYWORD1
10+
11+
#######################################
12+
# Methods and Functions (KEYWORD2)
13+
#######################################
14+
15+
Enable_X KEYWORD2
16+
Disable_X KEYWORD2
17+
ReadID KEYWORD2
18+
Get_X_Axes KEYWORD2
19+
Get_X_Sensitivity KEYWORD2
20+
Get_X_AxesRaw KEYWORD2
21+
Get_X_ODR KEYWORD2
22+
Set_X_ODR KEYWORD2
23+
Get_X_FS KEYWORD2
24+
Set_X_FS KEYWORD2
25+
Enable_DRDY_Interrupt KEYWORD2
26+
Disable_DRDY_Interrupt KEYWORD2
27+
Set_Filter_Mode KEYWORD2
28+
Get_DRDY_Status KEYWORD2
29+
Get_FIFO_Num_Samples KEYWORD2
30+
Set_FIFO_Mode KEYWORD2
31+
ReadReg KEYWORD2
32+
WriteReg KEYWORD2
33+
34+
#######################################
35+
# Constants (LITERAL1)
36+
#######################################
37+
38+
LIS3DHH_ACC_SENSITIVITY LITERAL1

library.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=STM32duino LIS3DHH
2+
version=1.0.0
3+
author=SRA
4+
maintainer=stm32duino
5+
sentence=Ultra High Resolution 3D accelerometer.
6+
paragraph=This library provides Arduino support for the ultra high resolution 3D accelerometer LIS3DHH for STM32 boards.
7+
category=Sensors
8+
url=https://github.com/stm32duino/LIS3DHH
9+
architectures=stm32, avr, sam

0 commit comments

Comments
 (0)