Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

raspberrypilearning/fart-detector

Repository files navigation

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 that 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 advance 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

Extras

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

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