A webcam made of LEGO. Because of course.

An old Creative USB webcam, an ESP32, a tiny servo, and an excellent excuse to play.

What do you do when you want to close your laptop during a Zoom call but still need a webcam? Build your own out of LEGO, of course.

I put an old Creative USB webcam inside a LEGO build, added an ESP32 and a tiny servo, and gave it a moving cover. The board runs a small HTTP API over Wi-Fi. macOS Automator sends the requests, with keyboard shortcuts mapped to the custom buttons on my mouse. One click opens the cover. Another closes it. One mouse click and I physically disappear.

Along the way, I learned how to write an API that can run on an ESP32. Not bad for an excuse to play with LEGO.

Could I have just bought a regular webcam? Sure. But where’s the fun in that?

Overengineered? Yes. Regrets? Zero. LEGO, electronics, automation. I’m having a great time.

Thanks, M5Stack, for making hardware hacks this simple.

The LEGO webcam on the desk, with its M5Stack servo on the side and a blue minifigure on top.
The finished contraption. Pilot included.
Front view of the LEGO webcam on top of a monitor, with the lens exposed and the cover raised.
Ready for a call.
The webcam with the top removed, revealing the old USB camera circuit board inside the LEGO housing.
Old webcam, new home.
Rear view showing the LEGO bracket holding the camera on the monitor, the servo wiring and the USB cable.
The mount is LEGO too. Naturally.

You have to see it in action.