This Android Things project executes all the hardware that is on the Pimoroni Rainbow HAT. This is a add-on board for the Raspberry Pi, and is designed to help with introduction to developing with Android Things.
The project is designed to demonstrate the specific protocols available on the Raspberry Pi, including:
- (SPI) - the APA102 LEDs
- (I2C) - the BPM280 sensor and Alphanumeric displays
- (GPIO) - the capacitive touch buttons and LEDs
- (PWM) - the piezo buzzer
Button A
- (SPI) - LEDs Rainbow color switches from left/tight
- (I2C) - Temperature displayed from sensor readings
- (GPIO) - Button press registered, and RED LED turned on
- (PWM) - Buzzer makes certain sound
Button B
- (SPI) - LEDs Rainbow color switches between random colors
- (I2C) - Barometric Indicator (LOW/MED/HIGH) displayed
- (GPIO) - Button press registered, and GREEN LED turned on
- (PWM) - Buzzer makes certain sound
Button C
- (SPI) - LEDs display clear
- (I2C) - Alphanumeric display clear
- (GPIO) - Button press registered, and BLUE LED turned on
- (PWM) - Buzzer makes certain sound
HDMI Display (optional)
- Current IP Assigned (time powered on)
- Current Temperature (time reported)
- Current Barometric Pressure (time reported)
This application will demonstrate all the hardware on the Rainbow HAT device in a single app.
I used the individual contrib drivers for this, but could have used the Rainbow Hat Contrib Driver if I wanted. This application should run on all supported Android Things hardware (including the Intel Edison or Joule for example), but hasn't been tested on any devices other then the Rasberry Pi 3.
I made extensive use of the drivers and examples on the Official Android Things Gitbub site - it is a great resource.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.