Bits of GRUB syntax on pink background

Wake, Boot, Repeat: Remote OS Selection With GRUB And ESP

What do you do when you need to choose an OS at boot but aren’t physically near your machine? [Dakhnod]’s inventive solution is a mix of GRUB, Wake-on-LAN (WOL), and a lightweight ESP8266 running a simple HTTP server. In the past, [dakhnod] already enlightened us with another smart ESP hack. This one’s a clever combination of network booting and remote control that opens up possibilities beyond the usual dual-boot selector.

At its core, the hack modifies GRUB to fetch its boot configuration over HTTP. The ESP8266 (or any low-power device) serves up a config file defining which OS should launch. The trick lies in adding a custom script that tells GRUB to source an external config:

#!/usr/bin/env cat 
net_dhcp 
source (http,destination_ip_or_host:destination_port)/grub/config

Since GRUB itself makes the HTTP request, the system needs a running web server. That could be a Raspberry Pi, another machine, or the ESP itself. From there, a WOL-enabled ESP button can wake the PC and set the boot parameters remotely.

Is it secure? Well, that depends on your network. An open, unauthenticated web server dishing out GRUB configs is risky, but within a controlled LAN or a VLAN-segmented environment, it’s an intriguing option. Automation possibilities are everywhere — imagine remotely booting test rigs, toggling between OS environments for debugging, or even setting up kiosk machines that reconfigure themselves based on external triggers.

For those looking to take it further, using configfile instead of source allows for more dynamic menu entries, although it won’t persist environment variables. You could even combine it with this RasPi hack to control the uptime of the HTTP server. The balance between convenience and security is yours to strike.

If you’ve got your own wild GRUB customisation, let’s hear it!

Photo of 3D Tetris LED matrix

From Retro To Radiant: 3D Tetris On A LED Matrix

We love seeing retro games evolve into new, unexpected dimensions. Enter [Markus]’ adaptation of 3D Tetris on a custom-built 3x3x12 RGB LED matrix. Developed as a university project, this open-source setup combines coding, soldering, and 3D printing. It’s powered by an ESP32 microcontroller with gameplay controlled by a neat web interface.

This 3D build makes the classic game so much harder to play, that one could argue whether it’s still a game, or has turned into a form of art. Although it is challenging to rotate and drop blocks on such a small scale, for die-hard Tetris fans (and we know you’re out there), there is always someone up to become best at it. Just look at the FastLED-powered light show, the responsive web-based GUI, and fully modular 3D printed housing, this project is a joy to look at even when nobody is playing it. Heck, a game that turned 40 only a year ago should be so mature to entertain itself, shouldn’t it?

From homemade Pong tables to LED cube displays, hobbyists keep finding ways to give classic games a futuristic twist. Projects like this are about pushing boundaries. Hackaday’s archives are full of similar innovations, but why not craft some new ones?

Continue reading “From Retro To Radiant: 3D Tetris On A LED Matrix”

[Wills] and his purple DIY sorting hat

From Felt To Fate: Building Your Own Sorting Hat

Ever wondered how it feels to have the Sorting Hat decide your fate? [Will Dana] wanted to find out, so he conjured a bit of Hogwarts magic, and crafted a fully animatronic Sorting Hat from scratch. In the video below, he covers every step of bringing this magical purple marvel to life—from rapid joystick movements to the electronics behind it all.

The heart of the project is two 9g servos—one actuates the mouth, and the other controls the eyebrows—powered by an ESP32 microcontroller. Communication between two ESP32 boards ensures smooth operation via the ESP-NOW protocol, making this a wireless wonder. The design process involved using mechanical advantage to solve jittery servo movements, a trick that will resonate with anyone who’s fought with uncooperative motors.

If animatronics or themed projects excite you, Hackaday has covered similar builds, from a DIY BB-8 droid to a robot fox.

Continue reading “From Felt To Fate: Building Your Own Sorting Hat”

Moving The Snail Mail To WiFi

[Zak] loves getting a notification on his phone when he gets physical mail. Enough to wire his mailbox slot with an ESP8285 to send him alerts. Previously, [Zak] used a cellular-based solution as the mailbox slot was not within WiFi range. However, the network provider for the A9G GPRS module decided to move to different towers, and suddenly the module didn’t work. Unable to find a provider that had sensible pricing, he got to work redesigning the module.

The mailbox was now in a WiFi network range, meaning he no longer had to use cellular. This dramatically simplifies the design and uses an ESP-M2 module (think ESP8266 but with embedded flash). To maximize battery life, the ESP is entirely off most of the time. A reed switch triggers a 74LVC1G98 NAND gate with an inverted input. This enables the 3.3 voltage regulator. A 4uF capacitor holds the voltage regulator on for 716ms, giving the ESP8266 time to boot and drive the second pin of the logic gate so it can stay on. Once the web request completes (a call to a PHP server that takes 4-5 seconds, including WiFi association), it pulls the pin low, and the system powers off. With a custom server, [Zak] can include a few goodies, such as temperature and humidity from the SHT32-DIS sensor.

So far, the system has been chugging along for seven months and over 110 mail notifications and has only dropped 0.3v, suggesting that the battery should hold out for another year or two before recharging. The code and schematics are up on GitHub. We love the low-power focus and the handy circuit explanation that makes it easy to use in other projects.

Snail Mail Notifier’s Simple Power Management To Maximize Battery Life

There are no weird, specialized components nor esoteric sleep mode tricks behind the long battery life of [Zak]’s WiFi mail slot watcher. Just some sensible design and clever focus on the device’s purpose: to send an HTTP request whenever it detects that the front door’s mail slot has been opened. The HTTP request is what kicks off useful notifications, but it’s the hardware design that’s really worth a peek.

The watcher’s main components are a ESP-M2 WiFi module, a reed switch, and a single lithium cell. Here’s how it works at a high level: when the mail slot is opened (detected by the reed switch), the ESP module is powered up just long enough to connect to the local WiFi network and send a single HTTP request, after which it shuts back down. The whole process takes between four and ten seconds.

As mentioned, the power control isn’t managed by any unusual components; it comes down to a NAND gate with a single inverted input, and a MIC5504 3.3 V regulator responsible for feeding the ESP board. The logic gate controls whether the voltage regulator is enabled or disabled, and therefore whether the microcontroller receives any power at all. Most of the time the regulator is disabled, but when the reed switch triggers, its input to the NAND gate is pulled low and the regulator is turned on, booting up the ESP board.

In order to stay on, the first thing the ESP board does is use a GPIO pin to drive the inverted input of the NAND gate high in order to keep the regulator enabled, and it has a window of about half a second to do this. Once the HTTP request is sent (and the battery voltage sensed), the ESP board pulls that pin low, disabling the regulator and turning itself off until the reed switch once again begins the process.

After seven months of use, the battery has dropped from 4.2 V to 3.9 V, so there’s plenty of life left. The project’s GitHub repository has the necessary code if you’d like to apply some of its ideas to your own projects. Alternately, you may wish to consider supercapacitors and solar in lieu of batteries. Even if ultra-level power savings isn’t your bag, when WiFi and networking is involved, there are software-level opportunities to be more efficient. Even a judicious 1 ms delay can save a surprising amount of power in the right circumstances.

For The ESP’s Next ESP Trick…

It is a pretty stale dad joke to tell someone you have ESP when you mean you have an ESP8266 or ESP32 in your hand. However, [Naufil Metkar] uses an ESP device to pretend — via a magic trick — that he does have ESP. The trick requires a bit of 3D printing, an MPU6050 gyro sensor, and a lot of showmanship.

We hate to spoil an illusion, but you can probably figure it out from the list of things you need. The die has a gyro in it and uses a small ESP module to transmit its current orientation out to a display. There is a small reed switch that lets you turn off the device with a magnet. Without it, the battery dies quickly.

Continue reading “For The ESP’s Next ESP Trick…”

Templateize Your Timetable With EPaper Templates

To date, e-paper technology has been great for two things, displaying static black and white text and luring hackers with the promise of a display that is easy on the eyes and runs forever. But poor availability of bare panels has made the second (we would say more important) goal slow to materialize. One of the first projects that comes to mind is using such a display to show ambient information like a daily summary weather, train schedules, and calendar appointments. Usually this means rolling your own software stack, but [Christopher Mullins] has put together a shockingly complete toolset for designing and updating such parameterized displays called epaper_templates.

To get it out of the way first, there is no hardware component to epaper_templates. It presupposes you have an ESP32 and a display chosen from a certain list of supported models. A quick search on our favorite import site turned up a wide variety of options for bare panels and prebuilt devices (ESP32 and display, plus other goodies) starting at around $40 USD, so this should be a low threshold to cross.

Once you have the device, epaper_templates provides the magic. [Christopher]’s key insight is that an ambient display is typically composed of groups of semi-static data displayed in a layout that never changes. The only variation is updates to the data which is fully parameterized: temperature is always integer Fahrenheit, train schedules are lists of minutes and hours, etc. Layouts like this aren’t difficult to make, but require the developer to reimplement lots of boilerplate. To make them easy to generate, epaper_templates provides a fully featured web UI to let the user freely customize a layout, then exports it as JSON which the device consumes.

The sample layout configured in the video below

The web UI is shockingly capable, especially for by the standards of the embedded web. (Remember it’s hosted on the ESP32 itself!) The user can place text and configure fonts and styles. Once placed, the text can be set to static strings or tied to variables, and if the string is a timestamp it can be formatted with a standard strftime format string.

To round out the feature set, the user can place images and lines to divide the display. Once the display is described, everything becomes simple to programmatically update. The ESP can be configured to subscribe to certain MQTT topics from which it will receive updates, or if that is too much infrastructure there is a handy REST API which accepts JSON objects containing variables or bitmaps to update on device.

We’re totally blown away by the level of functionality in epaper_templates! Check out the repo for more detail about its capabilities. For a full demo which walks through configuration of a UI with train arrival times, weather, both instant temperature and forecast with icons, and date/time check out the video after the break. Source for the example is here, but be sure to check out examples/ in the repo for more examples.

Continue reading “Templateize Your Timetable With EPaper Templates”