2025 One Hertz Challenge: STM32 Blinks In Under 50 Bytes

Many of us have run a Blink program on a microcontroller before. It’s effectively the “Hello, World!” of the embedded space. However, few of us have ever thought about optimizing our Blink code to be as miniscule as possible. But that’s precisely what [Rudra Lad] did for this entry into the 2025 One Hertz Challenge!

This example of Blink, delay_blinky_13, is built specifically for the STM32F4 Discovery microcontroller development board. [Rudra] notes the code is “highly optimized” and compiles down to a binary size of under 50 bytes. The code doesn’t even use RAM, and it aims to get the blink as close to 1 Hz as possible. Many optimizations were used to crunch it down as small as possible. For example, the standard startup code isn’t used, with the entire program instead written in the Reset_Handler to save space. Bit-band is also used to write to peripheral registers to blink the LED, since this uses less instructions than the typical methods. Meanwhile, with many tweaks to the delay counting routine, [Rudra] was eventually able to get the blink frequency to 1.00019 Hz, as measured on a logic analyzer. That’s pretty darn close!

While it’s rare that you have only 50 bytes of binary space to blink an LED, work like this is a great way to flex your coding muscles. Code is on Github for the curious, and if you’ve worked up your own impressive tiny binaries, don’t hesitate to let us know!

PCB Business Card Plays Pong, Attracts Employer

Facing the horrifying realization that he’s going to graduate soon, EE student [Colin Jackson] AKA [Electronics Guy] needed a business card. Not just any business card: a PCB business card. Not just any PCB business card: a PCB business card that can play pong.

[Colin] was heavily inspired by the card [Ben Eater] was handing out at OpenSauce last year, and openly admits to copying the button holder from it. We can’t blame him: the routed-out fingers to hold a lithium button cell were a great idea. The original idea, a 3D persistence-of-vision display, was a little too ambitious to fit on a business card, so [Colin] repurposed the 64 LED matrix and STM32 processor to play Pong. Aside from the LEDs and the microprocessor, it looks like the board has a shift register to handle all those outputs and a pair of surface-mount buttons.

Of course you can’t get two players on a business card, so the microprocessor is serving as the opponent. With only 64 LEDs, there’s no room for score-keeping — but apparently even the first, nonworking prototype was good enough to get [Colin] a job, so not only can we not complain, we offer our congratulations.

The video is a bit short on detail, but [Colin] promises a PCB-business card tutorial at a later date. If you can’t wait for that, or just want to see other hackers take on the same idea, take a gander at some of the entries to last year’s Business Card Challenge. Continue reading “PCB Business Card Plays Pong, Attracts Employer”

Flex PCB Underlies The Watch Of The Future

If you were at OpenSauce, you may have seen new Youtuber [Sahko] waltzing about with a retrofuturistic peice of jewelery that revealed itself as a very cool watch. If you weren’t, he’s his very first video on YouTube detailing the design and construction of this piece.  We’ve embedded it below, and it’s worth a watch. (Pun intended, as always.)

The build was inspired by the delightful amber LED dot-matrix display modules that circle the band of the watch. They go by HCMS2901, but [Sahko] recommends using the HCMS3901 as it’s both more 3.3V-tolerant and easier to find now. A challenge in mounting so many displays was the voltage on the supply rail dropping below the logic level; presumably the newer version does not have this problem to the same degree. Either way we love the look of these little displays and are pondering projects of our own that might include them.

He’s got quite a few wrapped around his wrist, so at full brightness, all these displays draw one amp. That explains why like the LED watches of the 1970s, the default state of the displays is “OFF”. Even with a LiPo pouch salvaged from a disposable vape, the runtime would only be half an hour at full brightness without that periodicity. Luckily [Sahko] included buttons on the band of the watch to activate it and control the brightness so it isn’t always blasting at full. There are also different modes available, including a really cool waterfall effect you can see in the video.

The band is an interesting choice, too: it’s just a flex PCB. There’s nothing backing it, aside from its own stiffeners, which makes us very curious how well this watch would hold up to daily use. There’s no clasp in the traditional sense, either: the band is closed by a 4-pin connector that doubles as both charge and the USB programmer for the stm32u08 microcontroller that runs the displays. Conveniently for a watch, this version of the stm32 has an RTC, so it keeps time as well. We dig the minimalism of this design; it’s a great contrast to the maximalism of wrapping your wrist in displays.

We’ve seen very similar displays on an edge-viewed watch, but a tiny amber LED matrix never gets old. If you wrapping your wrist in all those tiny LEDs is too impractically power-hungry, try using Nixie tubes.

We’re always watching for projects– wrist mounted clocks or otherwise– so if you’ve got the time, please drop us a tip.

Continue reading “Flex PCB Underlies The Watch Of The Future”

Screen shot of Mongoose Wizard.

How To Build An STM32 Web Dashboard Using The Mongoose Wizard

Today from the team at Cesanta Software — the people who gave us the open-source Mongoose Web Server Library and Mongoose OS — we have an article covering how to build an STM32 web dashboard.

The article runs through setting up a development environment; creating the dashboard layout; implementing the dashboard, devices settings, and firmware update pages; building and testing the firmware; attaching UI controls to the hardware; and conclusion.

The web dashboard is all well and good, but in our opinion the killer feature remains the Over-The-Air (OTA) update facility which allows for authenticated wireless firmware updates via the web dashboard. The rest is just gravy. In the video you get to see how to use your development tools to create a firmware file suitable for OTA update.

Continue reading “How To Build An STM32 Web Dashboard Using The Mongoose Wizard”

2025 Pet Hacks Contest: Loko Tracks Fido With LoRa And GPS

Some projects start as hacks, and end as products — that’s the case for [Akio Sato]’s project Loko, the LoRa/GPS tracker that was entered in our 2025 Pet Hacks Contest. The project dates all the way back to 2019 on Hackaday.io, and through its logs you can see its evolution up to the announcement that Loko is available from SeeedStudio.

It’s not a device necessarily limited to pets. In fact, the original use case appears to have been a backup locator beacon for lost drones. But it’s still a good fit for the contest none-the-less: at 12 grams, the tiny tracking device won’t bother even the most diminutive of pups, and will fit on any collar at only 30 mm x 23 mm. The “ground station” that pairs with your phone is a bit bigger, of course, but unless you have a Newfoundlander or a St. Bernard you’re likely bigger than fido. The devices use LoRa to provide a range up to 15 km — maybe better if you can loop them into a LoRaWAN. Depending on how often you pin the tracker, it can apparently last for as long as 270 days, which we really hope you won’t need to track a missing pet.

The hardware is based around Seeed’s Wio-E5 LoRa chip, which packages an STM32 with a LoRA radio. The firmware is written in MicroPython, and everything is available via GitHub under the MIT license. Though the code for the mobile app that interfaces with that hardware doesn’t appear to be in the repository at the moment. (There are folders, but they’re disappointingly empty.) The apps are available free on the iOS App Store and Google Play, however.

There’s still plenty of time to submit your own hacks to the Pet Hacks Contest, so please do! You have until May 10th, so if you haven’t started yet, it’s not too late to get hacking.

Diagram showing the structure of the base.

Magic On Your Desk Via MagLev Toy

Magnets aren’t magic, but sometimes you can do things with them to fool the uninitiated — like levitating. [Jonathan Lock] does that with his new maglev desk toy, that looks like at least a level 2 enchantment.

This levitator is USB-powered, and typically draws 1 W to 3 W to levitate masses between 10 g and 500 g. The base can provide 3 V to 5 V inductive power to the levitator to the tune of 10 mA to 50 mA, which is enough for some interesting possibilities, starting with the lights and motors [Jonathan] has tried.

In construction it is much like the commercial units you’ve seen: four permanent magnets that repel another magnet in the levitator. Since such an arrangement is about as stable as balancing a basketball on a piece of spaghetti, the permanent magnets are wrapped in control coils that pull the levitator back to the center on a 1 kHz loop. This is accomplished by way of a hall sensor and an STM32 microcontroller running a PID loop. The custom PCB also has an onboard ESP32, but it’s used as a very overpowered USB/UART converter to talk to the STM32 for tuning in the current firmware.

If you think one of these would be nice to have on your desk, check it out on [Jonathan]’s GitLab. It’s all there, from a detailed build guide (with easy-to-follow animated GIF instructions) to CAD files and firmware. Kudos to [Jonathan] for the quality write-up; sometimes documenting is the hardest part of a project, and it’s worth acknowledging that as well as the technical aspects.

We’ve written about magnetic levitation before, but it doesn’t always go as well as this project. Other times, it very much does. There are also other ways to accomplish the same feat, some of which can lift quite a bit more.

GK STM32 MCU-Based Handheld Game System

These days even a lowly microcontroller can easily trade blows with – or surpass – desktop systems of yesteryear, so it is little wonder that DIY handheld gaming systems based around an MCU are more capable than ever. A case in point is the GK handheld gaming system by [John Cronin], which uses an MCU from relatively new and very capable STM32H7S7 series, specifically the 225-pin STM32H7S7L8 in TFBGA package with a single Cortex-M7 clocked at 600 MHz and a 2D NeoChrom GPU.

Coupled with this MCU are 128 MB of XSPI (hexa-SPI) SDRAM, a 640×480 color touch screen, gyrometer, WiFi network support and the custom gkOS in the firmware for loading games off an internal SD card. A USB-C port is provided to both access said SD card’s contents and for recharging the internal Li-ion battery.

As can be seen in the demonstration video, it runs a wide variety of games, ranging from DOOM (of course), Quake, as well as Command and Conquer: Red Alert and emulators for many consoles, with the Mednafen project used to emulate Game Boy, Super Nintendo and other systems at 20+ FPS. Although there aren’t a lot of details on how optimized the current firmware is, it seems to be pretty capable already.

Continue reading “GK STM32 MCU-Based Handheld Game System”