Wemos D1 Mini Police Project

Wemos Police ProjectThe Fuzz. The Po-Po. The Rozzers. The 5-0. What do you call the police?


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 code it’ll make sounds and lights just like a bank-robber-chasing meat wagon.

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 police project parts
A few simple everyday components are all you need

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:

Wemos police project breadboard
I use two buzzers to pump out two tones at once, which creates the ear-splitting ‘nee naw‘ you hear flying past you.

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.
Buzzer legs
Like LEDs, buzzers usually have a longer leg for the positive terminal

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 persuit in action.

We’re also using the Arduino ‘tone’ command to produce a different tone for each buzzer. This