I want to add a new sensor type to Android Things using the user-space driver extension mechanism provided by the API. The new sensor type is ‘Distance’ and comes from a Laser Range Finder (LRF) connected via a UART. The goal for this project is to read data from the LRF over a UART, add ‘distance’ from the LRF as a new type of sensor, and display the distance on an LCD.
This task is about adding a new sensor type to Android Things. This is something you can’t do in Android (without modifying AOSP and building your own ROM) so I’m interested to see how the process goes.
The Setup
The setup is similar to my previous experiments with the addition of a laser range finder.
- Raspberry Pi 3 running Android Things preview image 1,
- LCM1602 (clone),
- character LCD,
- level shifter for I2C,
- laser range finder.
Disclaimer: I have access to this LRF because I work for the company that makes them. This is not something you can buy off the shelf.