Skip to content

jim841019g/IotTeam09

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WuKong IoT Final Project: SmartCans

Contents of This Repository

  • Final report: finalReport.pdf
  • Presentation slides: presentation.pdf
  • Source code: wukong-darjeeling/

1. Team Members

  • B03902007 Elise Cheng (elisedc)
  • B03902013 Jim Wu (jim841019g)

2. Basic Info

  • Raspberry Pi login: (username, password) = (pi, smartcan2016)
  • Connect to network 'Kochun'
  • IPs: jim 172.20.10.(10, 12) and elisedc 172.20.10.(11, 14)
Setup
  • On PC:
    • Install gradle
      • $ sudo apt-get update
      • $ sudo apt-get install gradle
      • $ sudo apt-get install openjdk-7-jdk
    • $ cd src/infuser
    • $ gradle
  • On Pi:
    • $ sudo apt-get update
    • $ sudo apt-get install python-twisted python-cjson python-gevent
    • $ sudo apt-get install sqlite3 python-netifaces
    • Install grovepi lib:
      • $ sudo apt-get install python-smbus i2c-tools
      • $ sudo raspi-config
      • Go to Advanced --> I2C and select yes
      • $ sudo reboot
      • Check if success: $ sudo i2cdetect -y 1
    • Install GrovePi environment
      • Download GrovePi library
      • $ cd GrovePi/Script
      • $ sudo chmod +x install.sh
      • $ sudo ./install.sh
      • $ cd Grovepi/Software/Python/
      • $ sudo python setup.py install
    • Install RPi.GPIO
      • $ sudo apt-get -y install python-rpi.gpio
Execution
  • On PC:
    • $ cd wukong/master
    • $ python master_server.py
  • On Pi:
    • $ cd wukong/gateway
    • configure IP settings in gtwconfig.py
    • $ python start_gateway.py

3. Equipment

  • LCD text display x4
  • ultrasonic distance detector x2
  • touch pad x2
  • Raspberry pi x4

4. WuClasses

  1. SC_Assigner (master/ virtual)
    • keep track of all trash cans & garbage types
    • notify Alerter to change status
    • assets: types (short)
    • inputs: alert x5 (boolean, Communicator)
    • outputs: clean (boolean, Alerter), assign_type x5 (short, Communicator)
  2. SC_Alerter (light actuator/ hard)
    • cleaning squad
    • inputs: clean (boolean)
    • outputs: none
  3. SC_Can_Controller (device/ virtual)
    • remember garbage type
    • control LCD displayer
    • communicate with assigner
    • inputs: assign_type (short, Assigner), is_full (boolean, Communicator)
    • outputs: alert (boolean, Assigner), type (short, Displayer), lock (boolean, Lock)
  4. SC_Displayer (LCD displayer/ hard)
    • display garbage type
    • inputs: type (short, Communicator)
  5. SC_Lock (light actuator/ hard)
    • control lock according to lock from Communicator
    • inputs: lock (boolean, Communicator)
  6. SC_Height_Tracker (ultrasonic detector/ hard)
    • track height inside trash can
  • Note 1: type asset values and meanings
    • 0: trash can is unavailable
    • 1: general trash
    • 2: paper
    • 3: plastic
  • Note 2: naming conventions
    • in WukongStandardLibrary.xml: SC_[Class_Name]
    • in udpdevice: udpdevice_sc_[class_name].py
    • initialization functions: [Class_Name]()

4. Scenario & Operation

  • Simulate 4 trash cans running on SmartCan application
  • Scenario: 2-3 types of trash

5. Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published