Skip to content

Using Python、HTML、Bootstrap、Raspberry-Pi to build an environment detection and plant-care system.

License

Notifications You must be signed in to change notification settings

5j54d93/Google-Hardware-Product-Sprint

Repository files navigation

Google Hardware Product Sprint-2021 APAC TW HPS

CodeQL GitHub contributors GitHub GitHub Repo stars GitHub repo size

Using Raspberry Pi 3 Model B+ to help us auto watering plants, and if there are birds aproaching, buzzer will noise to scare them away!We also have a dashboard(web)to view all related data which could auto switching between Day theme and Nithgt theme!And you could also remote control Raspberry Pi to watering or noising by clicking the button on website if you want!

Overview

  1. Wiring to Raspberry Pi
  2. How To Use
  3. Block Diagram
  4. LICENSE:MIT

Wiring to Raspberry Pi

Check the I2C devices:

SGP30:0x58 APDS9960:0x39 SHT31-D:0x44
pi@raspberrypi:~ $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- 39 -- -- -- -- -- --
40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- 58 -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Check the SPI devices:

Raspberry Pi MCP3008 ADXL203EB
pi@raspberrypi:~ $ ls -l /dev/spidev*
crw-rw---- 1 root spi 153, 0 Aug 28 13:17 /dev/spidev0.0
crw-rw---- 1 root spi 153, 1 Aug 28 13:17 /dev/spidev0.1

How To Use

Install Libraries on Raspberry Pi

sudo pip3 install -r requirements.txt

Download this Repository on Raspberry Pi

git clone https://github.com/5j54d93/Google-HPS

Run Web Server on Raspberry Pi

cd Google-HPS
sudo python3 Demeter.py

Open the Website

You could open it on computer, iPhone, iPad ......, as long as your device has a browser.
Make sure your device and Raspberry Pi are connect to the same WiFi.

  • URL:http://[your ip]
  • use ifconfig to check your ip
  • replace [your ip] to something like 192.xxx.x.xx or 192.xxx.x.xxx

Screenshot with Day theme and Nithgt theme(Automatic switching)

More detail information:template's README

Block Diagram

License:MIT

This package is MIT licensed.