IMPORTANT: Please, note that these samples are not necessarily the easiest way because the Android Things source code and documentation have not been published or completed and have some platform issues.
The next documentation is an alpha version.
Status- All sensors
- Everloop control
- Mic Array (in a branch, only data)
- Zigbee driver **
- Z-Wave driver **
- LIRC custom control config **
- MATRIX vision framework **
**
in progress
- RaspberryPi 3
- Android Studio 2.2+
For now you can test Matrix Creator with Android Things, for this we need FPGA burner running from root privileges, for it please follow next steps:
On your PC:
1. Flashing RPi3 Google Things image and connect with it via ADB. More info here.
2. Obtain root privileges: adb root
(takes some seconds)
3. Mount partitions on write mode: adb remount
4. Clone repository and submodules:
git clone --recursive https://github.com/matrix-io/matrix-creator-android-things.git
5. Copy firmware, burner, flashing script, and sensors test:
cd matrix-creator-android-things/firmware
adb push matrix_system.bit /system/bin/
adb push matrix-xc3sprog /system/bin/
adb push matrix-firmware-loader.sh /system/bin/
adb push matrix-sensors-status /system/bin/
6. Programing FPGA (~1 minute for flashing):
adb shell matrix-firmware-loader.sh
You get output like this:
disable Matrix Creator microcontroller..done
reconfigurate FPGA and Micro..
DNA is 0x79ec27f5572e2dfd
done
7. Testing FPGA status:
adb shell matrix-sensors-status
You get output like this:
IMUY:-1.1e+02° IMUR:0.26° IMUP:1.2°
HUMI:35% HTMP:35°C UVID:0.0032
PRSS:74960 PrAL:2470.7 PrTP:32.562
MCU :0x10 VER :0x161026
Troubleshooting:
- If you get sensors on 0, please repeat step 6.
- If you shutdown your Raspberry Pi, please repeat steps: 2 and 6 (root and reprograming FPGA).
From this point your have a basic Android Things project, for launch Demo (MatrixCreatorGT app) please execute this from main directory:
./gradlew installDebug
adb shell am start admobilize.matrix.gt/.MainActivity
On your ADB Logcat will obtain sensors status and Everloop LEDs will be animated:
(OPTIONAL) Contribute or build xc3sprog programmer codeFor building the latest FPGA programmer you need NDK and run:
You get output like this:
...
Linking CXX executable xc3sprog
[100%] Built target xc3sprog
[ 82%] Built target xc3sproglib
[100%] Built target xc3sprog
Installing the project stripped...
-- Install configuration: "Debug"
-- Installing: /home/username/src/admobilize/matrix-things/android_lib/xc3sprog/bin/xc3sprog
Then repeat steps 2 and 3 (firmware installation section) and copy new programmer:
cp android_lib/xc3sprog/bin/xc3sprog firmware/matrix-xc3sprog
adb push firmware/matrix-xc3sprog /system/bin/
Comments
Please log in or sign up to comment.