Giter Site home page Giter Site logo

handwashing_timer_led's Introduction

Handwashing_Timer_LED

Make a 20-second hand washing timer with an LED, random 20-music clip, activated with a motion sensor.

ProjectGIF

Materials

Materials:

Prerequisites

  1. Raspbian OS Setup on a microSD card - https://youtu.be/2Jfv9NO6J2Q

Step 1 - Hardware Assembly

  1. If you are using a Raspberry Pi Zero W, solder all GPIO header pins.

  2. Attach PIR Motion sensor to the Raspberry Pi GPIO pins as shown in the diagram the PIR motion sensor. VCC to GPIO pin 2. GND to GPIO pin 6, and OUT to GPIO pin 11.

WiringDiagram

  1. Attach LED and resistor to the breadboard. Attach positive (longer pin) of the LED to the resistor, then use the jumper wire to connect to GPIO pin 14 / Physical pin number 8. Attach Gnd to Gnd on GPIO. I am using physical pin number 14.

Step 2 - Install Software

  1. Install VLC for Python sudo pip install python-vlc

1a. Switch your audio output from HDMI to Analog Analog

  1. Git Clone this repository - git clone https://github.com/carolinedunn/Handwashing_Timer_LED

  2. Go into the directory you just created cd Handwashing_Timer_LED

  3. Test your setup by playing some music python test_music_led.py - If Music plays, then go to the next step, if not then go back and troubleshoot.

  4. Run the script! python pir-led.py

  5. Wave your hand over the motion sensor. If music plays, move to the next step, otherwise, go back and trouble shoot.

Step 3: Run on Boot

This step is optional if you'd like for this python script to run at boot.

  • Open a Terminal

  • Enter sudo nano /home/pi/.bashrc

  • Arrow down to the bottom of the file.

  • Enter the following at the bottom of the .bashrc

python /home/pi/Handwashing_Timer_LED/pir-led.py

  • Ctrl-X to exit
  • 'y' to Save
  • Reboot your Raspberry Pi.

handwashing_timer_led's People

Contributors

carolinedunn avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.