Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xrigau/androidthings-ws2801-driver
Android Things driver for the WS2801 RGB LED strip (includes demo app)
https://github.com/xrigau/androidthings-ws2801-driver
Last synced: 9 days ago
JSON representation
Android Things driver for the WS2801 RGB LED strip (includes demo app)
- Host: GitHub
- URL: https://github.com/xrigau/androidthings-ws2801-driver
- Owner: xrigau
- Created: 2016-12-30T01:06:38.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-05T13:33:49.000Z (over 6 years ago)
- Last Synced: 2024-08-01T17:24:36.292Z (3 months ago)
- Language: Java
- Homepage:
- Size: 344 KB
- Stars: 16
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-android-things - WS2801 - LED strips WS2801 (Useful links / Drivers)
- awesome-android-things - WS2801 - LED strips WS2801 (Useful links / Drivers)
README
# androidthings-ws2801-driver [ ![Download](https://api.bintray.com/packages/xrigau/maven/ws2801-driver/images/download.svg) ](https://bintray.com/xrigau/maven/ws2801-driver/_latestVersion)
This repo contains the Android Things driver to control an LED strip based on the WS2801 chip (and should work on similar LED strips as long as the protocol is the same).
The driver can be found in the `ws2801-driver` module and there's a demo app showing how to use the driver in the `demo-app` module.
Only tested with a Raspberry Pi 3 but should work with other devices too.
## Schematics
![raspberry pi 3 schematics](rpi3-schematics.png)
## Using
The driver is now available on jCenter so you can include it as a gradle dependency:
```groovy
dependencies {
compile 'com.xrigau:ws2801-driver:1.0.0'
}
```And you can start using it in your Android Things project:
```java
Ws2801 ledstrip = Ws2801.create(SPI_DEVICE_NAME, Ws2801.Mode.RGB);
ledstrip.write(new int[]{Color.parseColor("#0face0")});// Later on
ledstrip.close();
```
More on the WS2801: https://cdn-shop.adafruit.com/datasheets/WS2801.pdf