Giter VIP home page Giter VIP logo

handwashing_timer_music's Introduction

Handwashing_Timer_Music

Raspberry Pi with Pimoroni Speaker Phat and motion sensor that plays a 20 second song to indicate length of hand washing. NOTE: This is a SOLDERING project! I do not recommend this project for someone without prior soldering experience.

ProjectGIF

Materials

Materials:

SpeakerPHATnotsoldered

Tools

Solder Iron

Solder

Solder Holder

Prerequisites

  1. Soldering Skills

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

Step 1 - Hardware Assembly

  1. Assemble Pimoroni Speaker pHat and solder - https://learn.pimoroni.com/tutorial/sandyj/assembling-speaker-phat

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

  3. Solder wires to pins 2, 4, and 11 of the Speaker Phat.

  4. Solder or attach as shown in the diagram the PIR motion sensor.

WiringDiagram

Step 2 - Install Software

  1. Install Pimoroni SPEAKER PHAT software curl -sS https://get.pimoroni.com/speakerphat | bash

  2. Hit 'y' twice and reboot when prompted. (Yes, you want the full install.)

[More info about Pimoroni SpeakerpHat here - https://github.com/pimoroni/speaker-phat ]

  1. Test your install by playing a test file vlc /home/pi/Pimoroni/speakerphat/test/test.mp3

If sound plays, you can move onto the next step. If not, sudo apt-get install vlc

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

  2. Git Clone this repository - git clone https://github.com/carolinedunn/Handwashing_Timer_Music

  3. Go into the directory you just created cd Handwashing_Timer_Music

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

  5. Run the script! python pir.py

  6. 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_Music/pir.py

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

handwashing_timer_music'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.