Madness Machine

by 8BitsAndAByte in Circuits > Raspberry Pi

5114 Views, 21 Favorites, 0 Comments

Madness Machine

01.png

A small project with a single evil purpose, fooling people into checking their phones.

Supplies

Project Video

Madness Machine

Box

10.png
02.png

We need something that can hold all our electronics, yet is simple to hide. A small electronics box from the local hardware store is the perfect candidate.

The only modifications needed are drilling a hole in the side, and removing one of the screw holders to make more space.

The changes needed really depend on your box, so as long as all the electronics fit, and you can attach the toggle switch(see next step) somehow, you're all good.

Hardware

04.png
08.png
05.png
09.png
Untitled Sketch 2_bb.jpg
06.png

With our box complete we can start adding some hardware. We start with attaching the toggle switch to the box, using our freshly drilled hole.

After doing some basic setup on the Raspberry Pi Zero and charging the LiFePO4wered/Pi+, we can assemble the two. They each have their specific role, the Pi Zero executes logic and the LiFePO4wered/Pi+ provides power.

Last but not least, we solder the toggle switch and vibration disc connections. Normally it's best to use jump wires, but we don't have enough space, so instead we directly attach them to the Pi.

Code

Code_Kjgufs2eaF.png
07.png

Now we move on to the code itself. It's written in python and included below.
To give you a good idea of how it works, the main logic is as follows:

  • Check if the toggle switch is on
    • If so, turn on the vibration disc for two seconds, and wait a random amount of time (between 60 and 300 seconds)
    • If the switch is off, do nothing

With the code written and working, we can complete the build by mounting the top.

Downloads

Result

00.png
01.png

With our irritating invention complete it's time for the final, and best step, causing mayhem!
Just toggle on the switch, hide the devious device and enjoy the ensuing spectacle.