Skip to content

ntdinh05/321_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

CSE321_Project_Final

Hardware Components

  • Arduino R3 UNO
  • Breadboard
  • Jumper wires
  • 2 ultrasonic sensors
  • 16x2 LCD Display
  • Joystick
  • Push button
  • RTC module DS1307
  • LED
  • Resistors for LCD and LED wiring

Hardware wiring

  • Ultrasonic 1: trigPin1 = 9, echoPin1 = 10
  • Ultrasonic 2: trigPin2 = 11, echoPin2 = 12

Note: ideally, the 2 sensors should be placed horizontal separately (trig/echo face of the sensors facing the same direction) by 5 - 7 inches in between to prevent crosstalk.

  • LED: lightPin = 8
  • Joystick: joyXPin = A0, joyYPin = A1, joySWPin = 13
  • Push button: menuButtonPin = A2

Software Setup

Library

  • LiquidCrystal
  • RTClib

Compile and Run

  • Use the Arduino IDE, open the code.ino file, choose your board, and upload the code
  • Note: if you run the RTC in the first time, you have to write some scripts to set up the time for RTC

Interact manual

  • After having your system set up, walk by the 2 sensors normally to see the occupancy increasing and decreasing
  • For the menu, press the push button (not the joystick switch)
  • For navigation in menu, move the joystick UP/DOWN. To select an setting in menu, press the joystick switch.
  • For navigation in setting, move the joystick LEFT/RIGHT to select Min/Sec or Hr/Min, UP/DOWN to increment/decrement the selecting variable
  • To save the setting/go back to the main screen, press the push button again

Main features

  1. x2 Ultrasonic sensors (main feature): measure the occupancy, using a threshold distance value. Objects in the threshold means a sensor is triggered. We decide entry/exit based on which one is triggered first.
  2. Set Timeout: set how long will the lights go off
  3. Set Do not Disturb: the lights will not off if in that time range
  4. Set Occupancy: declare how many people in the room

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages