Skip to content

darrenyaoyao/GoogleHPS

Repository files navigation

Google Hardware Product Sprint-2021 APAC TW HPS

  • Project name:Demeter
  • Mentor:Weihsuan
  • Team:2

Wiring to Raspberry Pi

Check the I2C devices

  • Air Quality0x58
  • Light0x39
  • Temperature & Humidity0x44
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 to MCP3008 to 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

Install Libraries

sudo pip3 install -r requirements.txt

Run Web Server

sudo python3 SmartGardener.py

Open the Website: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)

Buzzer

Connect ground to Buzzier's negative pin, Raspberry Pi pin 16 (GPIO 23) to Buzzier's positive pin

Relay and Pump

  • Relay's VCC connect pin4(5v5)
  • Relay's GND connect pin6(GND)
  • Relay's IN connect pin18(GPIO24)
  • Relay's NO connect pin17(3v3)
  • Relay's COM connect Pump's red wire
  • Pump's black wire connect ground

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published