Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blundell/pirmotionsensormoduletut
Android Things - PirSensor Tutorial
https://github.com/blundell/pirmotionsensormoduletut
android-things iot
Last synced: 23 days ago
JSON representation
Android Things - PirSensor Tutorial
- Host: GitHub
- URL: https://github.com/blundell/pirmotionsensormoduletut
- Owner: blundell
- Created: 2017-01-26T21:37:56.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-13T20:37:38.000Z (over 6 years ago)
- Last Synced: 2024-08-01T17:24:34.940Z (3 months ago)
- Topics: android-things, iot
- Language: Java
- Size: 86.9 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
### HC-SR501
#### PIR Motion Sensor
##### Android Things User DriverAccompanying Blog Post:
http://blog.blundellapps.co.uk/tut-android-things-writing-a-pir-motion-sensor-driver/
Simple useage:
```java
@Override
protected void onCreate() {
Gpio bus = bus = new PeripheralManagerService().openGpio("BCM18");
motionSensor = new PirMotionSensor(bus, this);
motionSensor.startup();
}@Override
public void onMovement() {
Log.d("TUT", "MOVEMENT DETECTED");
}@Override
protected void onDestroy() {
motionSensor.shutdown();
super.onDestroy();
}```