“HANDS UP!”…”GET ON THE GROUND NOW!”…”DON’T MOVE OR
Ah yes, classic lines from some of my favourite cop shows. The drama and excitement of policing is fun to watch from afar, but I don’t think I’ve got the plums to do that job myself.
For those of us hiding in the safety of our living rooms, there is a way to feel like you’re riding the ‘blues and twos’…albeit a bit of a nerdy way…
Let’s make a badass crime-busting police car project with the Wemos D1 Mini, some LEDs and buzzers!
Getting into Character
We can’t do this whilst we still feel like helpless civilians, so I refer you to my brother from another mother KRS-One to get you into street cop mode *whoop whoop*:
What We’re Making
This project hooks up two buzzers and LEDs, and with some simple
The buzzers make use of a nifty Arduino ‘tone’ command which makes it easy to pump different tones out of the buzzers.
Here’s a video showing my finished project in action (it’s noisy, careful now!):
What You’ll Need
This is a nice simple project, requiring readily available and affordable parts:
- Wemos D1 Mini ($3.50, AliExpress.com)
- Medium (320-point) Breadboard (£3, ThePiHut.com)
- 2x Piezo Buzzers (£1 each, ThePiHut.com)
- 1x Blue LED + 1x Red LED (£6 300 LED kit, ThePiHut.com / eBay for smaller quantities)
- 4x resistors (£6 575 resistor kit, ThePiHut.com /
eBay for smaller quantities ) - Some jumper wires (£6 120 pack, ThePiHut.com)

How to make it
Here’s a Fritzing diagram showing how I have my circuit hooked up:

Thanks to Fritzing.org for the fantastic software
Here’s my breadboard project to give you an idea of what that looks like in real life:

So it’s simple enough – each of the LEDs has the negative leg going from GND through a resistor, and the positive leg runs to a GPIO pin. The buzzers are the same just without the resistors. Easy!
Some pointers:
- Buzzers have a set polarity (+ and -). Any half-decent buzzer should have a longer positive leg just like an LED, and should also have a ‘+’ printed on the top.
- LEDs also have a set polarity of course. The longer leg is the positive (+) leg. Get this wrong and you’ll kill your LED.

How to Code it
If you haven’t yet set up your Wemos D1 Mini in the Arduino IDE – check out my post on that here.
We’re going to be turning the GPIO pins on/off to make our LEDs mimic a hot
We’re also using the Arduino ‘tone’ command to produce a different tone for each buzzer. This