DEV Community

Cover image for How I hacked my cats with an Arduino
Cynthia HENAFF
Cynthia HENAFF

Posted on • Updated on

How I hacked my cats with an Arduino

Build an automatic laser pointer for cat for 5€

I have three cats and I love them… and they love chasing the uncatchable dot of a laser pointer. Playing with my three cats takes a lot of time and sometimes I don’t have much time for them 😿
I asked myself, why couldn’t my cats play with their favorite game on their own? Because it requires a human presence. So I decided to give them this opportunity and automated this process.

cat laser

I built a laser turret for my cats, programmed to move randomly and connected with Wi-Fi.

I decided to use an esp8266 D1 mini because I think it’s awesome! It’s like an Arduino but it has a Wi-Fi module which allows to connect all your projects to the Internet. It’s small, cheap (2€) and compatible with the Arduino IDE.


It allowed me to connect to Blynk. Now I can launch it remotely and program it with desired time and duration.
Blynk is a free Platform with iOS and Android apps to control boards such as the Esp8266, Arduino, Raspberry Pi over the Internet. It’s really simple to set up and have a working app in less than 5 minutes.

My Blynk app

blynk app

To build your awesome Laser Cat, you need:
To build your awesome Laser Cat, you need:

laser cat

Here is my electronic diagram.
electronic diagram

The “X” servo is attached to pin D5 and the “Y” servo to pin D6 and powered in 5V.
The laser module is attached to pin D7 which allows to power it in 3.3V.
⚠️ Powering the laser module in 5V could hurt cat eyes.

The code is open source and available on GitHub (don’t forget to add a ⭐️).

Enjoy your cat.


Top comments (2)

itip profile image
Henri Michel

This is truly amazing! Wouldn’t try it with my aussie though, it would 100% drive her loopy. 😂

juancarlospaco profile image
Juan Carlos

Need photo of it.