-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #375 from pborcin/feat/qma6100p
add qma6100p accelerometer
- Loading branch information
Showing
17 changed files
with
1,209 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
idf_component_register( | ||
SRCS "qma6100p.c" | ||
INCLUDE_DIRS "include" | ||
REQUIRES "driver" | ||
) | ||
|
||
include(package_manager) | ||
cu_pkg_define_version(${CMAKE_CURRENT_LIST_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# QMA6100P Driver Component | ||
|
||
[![Component Registry](https://components.espressif.com/components/espressif/qma6100p/badge.svg)](https://components.espressif.com/components/espressif/qma6100p) | ||
|
||
C driver for QST QMA6100P 3-axis accelerometer based on I2C communication. | ||
|
||
## Features | ||
|
||
- Get 3-axis accelerometer data, either raw or as floating point values. | ||
- Configure accelerometer sensitivity. | ||
- Support for QMA6100P interrupt generation when data ready (occurs each time a write to all sensor data registers has been completed). | ||
|
||
## Important Notes | ||
|
||
- Keep in mind that QMA6100P I2C address depends on the level of its AD0 pin (1) (0x12 when low, 0x13 when high). | ||
- In order to receive QMA6100P interrupts, its INT pins (5, 6) must be connected to a GPIO on the ESP32. | ||
|
||
## Limitations | ||
|
||
- Only I2C communication is supported. | ||
- If QMA6100P interrupts are used, it is recommended to not read data using I2C directly from the ISR. | ||
|
||
## Get Started | ||
|
||
This driver, along with many other components from this repository, can be used as a package from [Espressif's IDF Component Registry](https://components.espressif.com). To include this driver in your project, run the following idf.py from the project's root directory: | ||
|
||
``` | ||
idf.py add-dependency "espressif/qma6100p" | ||
``` | ||
|
||
Another option is to manually create a `idf_component.yml` file. You can find more about using .yml files for components from [Espressif's documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html). | ||
|
||
## See Also | ||
* [QMA6100P datasheet](https://www.qstcorp.com/upload/pdf/202203/13-52-20%20QMA6100P%20Preliminary%20Datasheet%20Rev.%20A1_SPImode03.pdf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: "1.0.0" | ||
description: I2C driver for QMA6100P accelerometer | ||
url: https://github.com/espressif/esp-bsp/tree/master/components/qma6100p | ||
dependencies: | ||
idf : ">=4.0" | ||
cmake_utilities: "0.*" |
Oops, something went wrong.