November 11, 2026
My first microcontroller turns on my PC

My PC stays off most of the time. There’s no reason to burn electricity on it when I’m not using it. The problem is that a lot of what I do depends on it: my phone and my laptop can’t run what I need, so I reach my home PC remotely. And when I left the house, the only option was to leave it running. If I was away for more than a day, too bad.
I wanted to be able to turn the computer on from anywhere, whenever I needed it. Now I tap a shortcut on my iPhone, and in under a minute it’s on. I’ve tested it over 4G, away from home, and it worked. The thing doing it is an ESP32 that cost me R$37 (under US$10), the first microcontroller I’ve ever programmed.
A PC that’s off, but always available
My workflow today revolves around my home PC. I use Orca to work with Claude Code, and Tailscale to connect my devices to each other. (That setup deserves a post of its own, so it’ll come later.) My bot, Hermes, also uses the computer for some tasks, and it has no way of pressing the power button.
In a way, the PC was already ready for this: when it boots, a script opens everything I need to work. I call it “work mode”, and the work here is my own projects. There’s also a “game mode” that closes those tools and leaves only what I use to have fun. I switch between them from the Start menu. The only missing piece was the start of the chain: turning the machine on without being in front of it.
The classic answer is Wake-on-LAN. The network card keeps listening even with the PC off, and when it receives a “magic packet” with its own address, it wakes the computer. The catch is that the packet has to come from inside the home network. Something has to be there, always on. I thought about using an old Android phone, but couldn’t find one around the house. Then I found out an ESP32 cost R$37. Cheap, draws almost nothing, and I’d never touched one. The challenge counted too.
Counting the minutes
The board arrived on a workday, and I spent the afternoon counting the minutes until I could log off. The moment I did, I started playing with it.
It began with the “hello world” of microcontrollers: making the board’s LED blink. There were a few stumbles with the USB cable and port, the kind you’d expect from someone who had never plugged one of these in, but soon the LED was blinking at exactly the rhythm I’d asked for, and the Serial Monitor was printing “on, off”. Then came Wi-Fi: the board joined the network and printed its IP. It sounds like nothing, but watching that tiny board show up on my network was a lot of fun.

Getting the PC ready to wake up
Before sending any packet, the PC has to agree to be woken up. That comes in two parts. In the BIOS, you enable wake from the network card and disable a power-saving option that cuts its power when the PC shuts down (on my ASUS board, Power On By PCI-E and ErP Ready). In Windows, you enable “Wake on Magic Packet” in the network card’s properties.
My PC is wired and has a fixed IP, both on the router and on the computer. I haven’t tested it without that, and I don’t plan to: that’s how I use it, and that’s how it works.
The BOOT button
The first test had no cloud, no phone, nothing. I used the board’s own BOOT button: press it, and it sends the magic packet across the network. The packet itself is simple, six 0xFF bytes followed by the PC’s MAC address repeated sixteen times:
uint8_t pkt[102];
memset(pkt, 0xFF, 6);
for (int i = 1; i <= 16; i++)
memcpy(pkt + i * 6, PC_MAC, 6);
udp.beginPacket(BROADCAST, 9);
udp.write(pkt, sizeof(pkt));
udp.endPacket();
I shut the PC down, pressed the button, and it turned on. First try.
That was the best moment of the whole project. Back when I worked in infrastructure, I always wanted to play with Wake-on-LAN, and the conversations about it were almost always negative: it doesn’t really work, it’s hard to keep working, it isn’t worth it. And there it was, working on the first attempt. It has worked every single time I’ve tested it since.
From the button to the phone
With the packet working, I still had to press that button from far away. My first idea was a Telegram bot. It was while talking it through with Claude that I learned about MQTT: the ESP32 connects to a broker in the cloud and listens, and anything that publishes to the same channel can send it commands. I went with Adafruit IO, which has a free plan and accepts commands over HTTP, so I can fire them straight from an iPhone shortcut.
iPhone (Shortcuts) --> Adafruit IO --> ESP32 --magic packet--> PC
<-- status <-- pings the PC
It turned out much better than opening Telegram and sending a message to a channel every time. It’s one tap. Setting up the shortcut took some fiddling at first, but when it worked it felt surreal: tap an app on your phone and watch your computer turn on. The ESP32 also pings the PC and publishes whether it’s online, so after a minute the shortcut tells me the PC is up. I started with a 45-second wait and bumped it to 60, because sometimes it takes a little longer to boot.
It’s worth saying how Claude fit into this. I used it as a guide for the whole project. It saved me days of forum threads, contradicting opinions and piecing solutions together, and it suggested paths I didn’t even know existed, like MQTT. I defined the scope, what I could spend and what I did or didn’t want to do, and I built and tested every step.
A case that wouldn’t close
A loose board sitting on the rack wasn’t going to look great, so I went looking for a case to print on my A1 Mini. I found a model on MakerWorld, but the only versions available were for a 0.2 mm nozzle, and my printer uses 0.4 mm. I ran the file through my slicing optimization skill, which adapted everything to the 0.4 nozzle, and it printed without issues.
When I put it together, the lid wouldn’t close: my board came with the pins soldered on the sides, and the model had no room for them. I measured the case with calipers and sent the numbers to my modeling skill. It asks questions before generating anything: what the part is for, whether the focus is strength or looks, what matters to preserve. Before the final lid, I printed just a ring with the fit profile to check the measurements. They were right. I printed the lid and it came out exactly the right size, with vent slots and two holes for the board’s buttons.


Testing from far away
The test that was left was the real one: leave the house, open the shortcut over 4G, and see whether the PC turned on. It did. A minute later, the notification said it was online, and I was already connected to it, with everything open in work mode.
The code is on GitHub. Next up is turning it off from the phone too. And the posts about my Orca workflow and the skills I use are on the way.