/NTOU-CS-Project

Environment Detection and Plant-Care System

Primary LanguageHTMLMIT LicenseMIT

NTOU CS Project

CodeQL 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. Install Libraries on Raspberry Pi
  3. Download this Repository on Raspberry Pi
  4. Run Web Server on Raspberry Pi
  5. Open the Website

Wiring to Raspberry Pi

  • [I2C]Light:APDS9960
  • [I2C]Air Quality:SGP30
  • [I2C]Temperature & Humidity:SHT31-D
  • [SPI]Acceleration:ADXL203EB
  • [GPIO]Watering:Bump
  • [GPIO]Noise:Buzzer

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

Install Libraries on Raspberry Pi

sudo pip3 install -r requirements.txt

Download this Repository on Raspberry Pi

git clone https://github.com/5j54d93/NTOU-CS-Project

Run Web Server on Raspberry Pi

cd NTOU-CS-Project
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)

Block Diagram

License:MIT

This package is MIT licensed.