Sample peripheral drivers for Android Things.
NOTE: these drivers are not production-ready. They are offered as sample implementations of Android Things user space drivers for common peripherals as part of the Developer Preview release. There is no guarantee of correctness, completeness or robustness.
For your convenience, drivers in this repository are also published to JCenter as Maven artifacts. Look at their artifact and group ID in their build.gradle and add them as dependencies to your own project.
For example, to use the sh1106
driver, version 1.0
, simply add the line
below to your project's build.gradle
:
dependencies {
compile 'com.leinardi.android.things:driver-sh1106:1.0'
}
Driver | Type | Usage (add to your gradle dependencies) | Note |
---|---|---|---|
driver-ds3231 | real-time clock (RTC) | implementation 'com.leinardi.android.things:driver-ds3231:1.0' |
changelog sample driver-ds3231-receiver |
driver-epaperdriverhat | E-Paper Driver HAT | implementation 'com.leinardi.android.things:driver-epaperdriverhat:1.0' |
changelog sample |
driver-hcsr04 | ultrasonic ranging module | implementation 'com.leinardi.android.things:driver-hcsr04:1.0' |
changelog sample |
driver-hd44780 | alphanumeric dot matrix LCD | implementation 'com.leinardi.android.things:driver-hd44780:1.0' |
changelog sample |
driver-lsm9ds1 | 3D accelerometer, 3D gyroscope, 3D magnetometer and temperature sensor | implementation 'com.leinardi.android.things:driver-lsm9ds1:1.0' |
changelog sample |
driver-sh1106 | OLED display | implementation 'com.leinardi.android.things:driver-sh1106:1.0' |
changelog sample |
driver-tsl256x | light-to-digital converter | implementation 'com.leinardi.android.things:driver-tsl256x:1.0' |
changelog sample |
If you are using the version 0.1
of driver-lsm9ds1
, driver-pcf8574-hd44780
or driver-sh1106
please be aware that
the group ID and package name of these drives have been changed from com.leinardi.androidthings
to com.leinardi.android.things
.
If you want to use a version later than 0.1
you need to update your build.gradle
to use the new group id and the imports in your Java/Kotlin files to use the new package name.
In addition to this, also the artifact ID of driver-pcf8574-hd44780
has been changed to driver-hd44780
.
Copyright 2018 Roberto Leinardi.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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 at
http://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.