The idea is to design a “smart HOME” wherein one can control household devices using Android Things and Raspberry Pi. The project consists of controlling house appliance like Light, Fan, motor etc.
Steps involved in the project:
Step 1:Download and Install Android Studio. Create an account on Android Things Console. Create a product using suitable product setting.
In the factory image select latest android version and click build configuration. In the Build configuration list download the latest build you create. This is the Raspberry Pi image of Andriod Things.
Extract the downloaded .zip file to get the image of Android Things.
Step 2:Flashing the image onto raspberry pi:
Download and install two softwares:
- · SD card formatter –used format SD card
- · Win32DiskImager – used to flash image onto SD card
In SD card formatter select the correct SD card location and click on format
After formatting open Win32DiskImager select the correct device (sd card location) and correct image and click on write. After the write is successful you have completed flashing the memory card.
Step 3:Insert the SD card into the card slot in RPi3 and connect to any display using HDMI. Connect the Ethernet Cable from Router to the RPi3. Connect mouse and keyboard to the RPi3 for operations. After the OS boots up you will see the local IP address of the RPi3 being displayed.
Step 4:Connect the PC to same router and open cmd. Connect to the local IP address of RPi3 using commands
$ adb connect <ip-address> connected to <ip-address>:5555
To connect the device to Wifi run the following command :
$ adb shell am startservice -n com.google.wifisetup/.WifiSetupService -a WifiSetupService.Connect -e ssid ‘network ssid’ -e passphrase ‘password’
Replace ‘network ssid’ and ‘password’ with your Wifi credentials.
Note: if you have some difficulties running adb command you may have to set the adb path in Environment Variables.
Step 5:Download the simple UI from the samples link: https://developer.android.com/things/sdk/samples.html
Open this project using android studio make necessary changes to the code if required.
Step 6:Click on run and select the RPI3 in connected devices.
If you are unable to see your device then you may need to reconnect it using the command:
$ adb connect <ip-address> connected to <ip-address>:5555
If the run is successful then the application will be displayed on the monitor .
Step 7:Make the circuit diagram as shown in the figure. Finally with the above steps the project is complete.
Future work:
- Temperature sensors can be implemented to know the temperature of the house and alert the user using Google cloud APIs in case of any Fire.
- Camera can be connected to monitor the house and alert the user in case of any theft using Google Cloud Vision API.
Comments