Coder Social home page Coder Social logo

lurch / fart-detector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raspberrypilearning/fart-detector

0.0 3.0 0.0 4.05 MB

Bust people for farting with your Raspberry Pi

Home Page: http://www.raspberrypi.org/learning/fart-detector/

License: Other

fart-detector's Introduction

Fart Detector

Bust people for farting with your Raspberry Pi

All kids understand that farts are funny. As we grow older, some of us lose our sense of humour in this area. You'll be glad to hear we believe that building a real working fart detector has both educational and comedic value. If you have a relative or dog who frequently likes to stink up the family home, you'll be able to provide the advanced warning necessary to evacuate the room.

Lesson objectives

  • Understand the difference between analogue and digital
  • Understand binary counting
  • Understand voltage, current and resistance
  • Understand how an air quality sensor works
  • Understand fart potency

Lesson outcomes

  • To have built and programmed a working fart detector
  • To have made a rudimentary DAC (digital to analogue converter)
  • Gained experience in Python programming
  • Gained experience using the Raspberry Pi GPIO pins

Requirements

Hardware

  • Raspberry Pi (any model)
  • Micro USB power adaptor
  • An SD Card with Raspbian already set up through NOOBS (setup guide)
  • USB keyboard
  • USB mouse
  • HDMI cable
  • Ethernet cable
  • LAN with Internet connection
  • A monitor or TV
  • Breadboard (try Pimoroni or Maplin)
  • Male to Female jumper wires, at least 8 (try Pimoroni)
  • Male to Male jumper wires, at least 6 (try Pimoroni)
  • 2 x 47k ohm resistor, through hole (try Pimoroni or Maplin)
  • 1 x 22k ohm resistor, through hole (try Pimoroni or Maplin)
  • 1 x 10k ohm resistor, through hole (try Pimoroni or Maplin)
  • 1 x 4.7k ohm resistor, through hole (try Pimoroni or Maplin)
  • Air quality sensor (try RS Components)

Software

  • python-pygame

Extras

  • A digital multimeter (try Pimoroni or Maplin)
  • A can of deodorant or perfume (to simulate farts)

Time required

  • 2 to 3 hours

Steps

  1. Setting up your Pi
  2. Wire up the Air Quality sensor
  3. Wire up the trigger pin
  4. Build a resistor ladder DAC
  5. Play a test alarm sound
  6. Write code to calibrate the ladder
  7. Monitoring for farts and raising the alarm
  8. Continuous monitoring and recalibration
  9. Make the output even more amusing

Worksheet & included files

  • The worksheet
  • (Optional) Final version of Python code farts-final.py
    • Download to your Pi with the following commands:

      wget http://goo.gl/DrvYfl -O evacuate.mp3 --no-check-certificate
      wget http://goo.gl/OJBFEf -O farts-final.py --no-check-certificate
      chmod +x farts-final.py
      sudo ./farts-final.py

Licence

Unless otherwise specified, everything in this repository is covered by the following licence:

Creative Commons License

Fart Detector by the Raspberry Pi Foundation is licenced under a Creative Commons Attribution 4.0 International License.

Based on a work at https://github.com/raspberrypilearning/fart-detector

fart-detector's People

Contributors

davidhoness avatar bennuttall avatar lauraclay avatar

Watchers

Andrew Scheller avatar 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.