Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cagdasc/AndroidThings-ADXL345
ADXL345 3-axis accelerometer AndroidThings device driver
https://github.com/cagdasc/AndroidThings-ADXL345
android-library android-things androidthings driver embedded i2c i2c-sensors
Last synced: 9 days ago
JSON representation
ADXL345 3-axis accelerometer AndroidThings device driver
- Host: GitHub
- URL: https://github.com/cagdasc/AndroidThings-ADXL345
- Owner: cagdasc
- License: apache-2.0
- Created: 2016-12-22T21:06:28.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-08T14:27:45.000Z (over 6 years ago)
- Last Synced: 2024-08-01T17:24:32.176Z (3 months ago)
- Topics: android-library, android-things, androidthings, driver, embedded, i2c, i2c-sensors
- Language: Java
- Size: 14.8 MB
- Stars: 7
- Watchers: 4
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-android-things - ADXL345 3-axis accelerometer - ADXL345 3-axis accelerometer (Useful links / Drivers)
- awesome-android-things - ADXL345 3-axis accelerometer - ADXL345 3-axis accelerometer (Useful links / Drivers)
README
# AndroidThings-ADXL345
ADXL345 3-axis accelerometer AndroidThings device driver.\*Note this is a maintained fork of this project adding support for Android Things DP6 and DP7.
### Usage
1- Simple usage with create an object and call methods.
```java
String bus = "device_specific_bus";
ADXL345 adxl345 = null;
try {
adxl345 = new ADXL345(bus);Log.i(TAG + " Accel X", String.valueOf(adxl345.getAccelerationX()));
Log.i(TAG + " Accel Y", String.valueOf(adxl345.getAccelerationY()));
Log.i(TAG + " Accel Z", String.valueOf(adxl345.getAccelerationZ()));
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (adxl345 != null) adxl345.close();
} catch (IOException e) {
e.printStackTrace();
}
}
```2- There is a sample in this repo like [androidthings](https://github.com/androidthings/drivers-samples) driver samples.
###First Impression
![first_imp](first_imp.png)
![first_imp_out](first_imp_out2.png)License
-------Copyright 2016 Cagdas Caglak
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.