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: about 2 months 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 (almost 7 years ago)
- Last Synced: 2024-10-15T17:47:15.154Z (2 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
- awesome-android-things - HC-SR501 Motion Sensor - Motion Sensor Driver with creation tutorial (Useful links / Drivers)
- awesome-android-things - HC-SR501 Motion Sensor - Motion Sensor Driver with creation tutorial (Useful links / Drivers)
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();
}```