(Android Things + Google Assistant)
Room Automation for Kids
Hardware
- NXP Pico i.MX7D (i.MX6UL seems too slow)
- Arduino Pro Mini 3.3V
- MF-RC522 RFID
- 6 buttons
- 5 220ohm resistors
- 1 1kohm resistor
- USB microphone + audio speakers
Optional:
- Relay module
- Magic Blue BLE RGB Bulb
Schematics (NXP Pico i.MX7D)
Install the Arduino Sketch
Flash the arduino/main/main.ino
sketch to your Arduino Pro Mini 3.3V
Setting up the Google Assistant
- Enable the Google Assistant API and create an OAuth Client ID (name=
androidthings-googleassistant
) (Read here for help) - Download the
client_secret_NNNN.json
file from the credentials section of the Console - Use the
google-oauthlib-tool
to generate credentials:
pip install google-auth-oauthlib[tool]
google-oauthlib-tool --client-secrets client_secret_NNNN.json \
--credentials ./google-assistant/src/main/res/raw/credentials.json \
--scope https://www.googleapis.com/auth/assistant-sdk-prototype \
--save
- Make sure to set the Activity Controls for the Google Account using the application.
Deploy the Android Things app
- On the first install, grant the sample required permissions for audio and internet access:
./gradlew assembleDebug
adb install -g app/build/outputs/apk/debug/app-debug.apk
- On Android Studio, click on the "Run" button or on the command line, type:
adb shell am start com.nilhcem.kidsroom/.device.MainActivity