Simulating Embedded Development To Reduce Iteration Time

There’s something that kills coding speed—iteration time. If you can smash a function key and run your code, then watch it break, tweak, and smash it again—you’re working fast. But if you have to first compile your code, then plug your hardware in, burn it to the board, and so on… you’re wasting a lot of time. It’s that problem that inspired [Larry] to create an embedded system simulator to speed development time for simple projects.

The simulator is intended for emulating Arduino builds on iPhone and Mac hardware. For example, [Larry] shows off a demo on an old iPhone, which is simulating an ESP32 playing a GIF on a small LCD display. The build isn’t intended for timing-delicate stuff, nor anything involving advanced low-level peripherals or sleep routines and the like. For that, you’re better off with real hardware. But if you’re working on something like a user interface for a small embedded display, or just making minor tweaks to some code… you can understand why the the simulator might be a much faster way to work.

For now, [Larry] has kept the project closed source, as he’s found that it wouldn’t reasonably be possible for him to customize it for everyone’s unique hardware and use cases. Still, it’s a great example of how creating your own tools can ease your life as a developer. We’ve seen [Larry]’s great work around here before, like this speedy JPEG decoder library.
Continue reading “Simulating Embedded Development To Reduce Iteration Time”

FlyingCam Is A Sweet DIY Webcam On A Stick

Imagine you want to monitor a pot on the stove to see if it’s boiling over for just a few minutes, but you don’t want to have a dedicated permanent IP webcam solution in your kitchen. [Sebastian Duell]’s FlyingCam hijacks an IKEA lamp gooseneck to become something you never knew you needed: a wireless camera for short-term random remote observation. It’s a beautiful combination of 3D printing and commercial device re-use, and when paired with his DIY wireless screen, it’s a complete solution.

The guts of this project aren’t critical, or expensive. It’s built around one of those ESP32 single-board webcams, with an added fan, battery pack, antenna, and a power switch. You turn it on, and the AP in the ESP32 fires up, or optionally connects to your network. Point the camera at your target and you’re set, at least if you want to sit by your computer. But [Sebastian] also designed a nice simple remote screen, so you can keep tabs on your spaghetti wherever you roam around the house.

We love the attention to keeping the design simple here, both in form and in function. It’s a one-task device, so it’s important that it be extremely easy to use, and it’s hard to beat just pointing the thing and turning on a switch. And it doesn’t hurt that it’s good looking to boot.

IKEA stuff is cheap and cheerful, but often it’s missing just that one functionality that we want. What good is an air-quality sensor without MQTT logging capability, for instance? Or a standing desk that can’t remember set heights? Get hacking!

The ESP32 Bluetooth Backdoor That Wasn’t

Recently there was a panicked scrambling after the announcement by [Tarlogic] of a ‘backdoor’ found in Espressif’s popular ESP32 MCUs. Specifically a backdoor on  the Bluetooth side that would give a lot of control over the system to any attacker. As [Xeno Kovah] explains, much about these claims is exaggerated, and calling it a ‘backdoor’ is far beyond the scope of what was actually discovered.

To summarize the original findings, the researchers found a number of vendor-specific commands (VSCs) in the (publicly available) ESP32 ROM that can be sent via the host-controller interface (HCI) between the software and the Bluetooth PHY. They found that these VSCs could do things like writing and reading the firmware in the PHY, as well as send low-level packets.

The thing about VSCs is of course that these are a standard feature with Bluetooth controllers, with each manufacturer implementing a range of these for use with their own software SDK. These VSCs allow for updating firmware, report temperatures and features like debugging, and are generally documented (except for Broadcom).

Effectively, [Xeno] makes the point that VSCs are a standard feature in Bluetooth controllers, which – like most features – can also be abused. [Tarlogic] has since updated their article as well to distance themselves from the ‘backdoor’ term and instead want to call these VSCs a ‘hidden feature’. That said, if these VSCs in ESP32 chips are a security risk, then as [Xeno] duly notes, millions of BT controllers from Texas Instruments, Broadcom and others with similar VSCs would similarly be a security risk.

Here’s A Spy Movie-Grade Access Card Sniffing Implant

Some of our devices look like they’re straight out of hacker movies. For instance, how about a small board you plant behind an RFID reader, collecting access card data and then replaying it when you next walk up the door? [Jakub Kramarz] brings us perhaps the best design on the DIY market, called The Tick – simple, flexible, cheap, tiny, and fully open-source.

Take off the reader, tap into the relevant wires and power pins (up to 25V input), and just leave the board there. It can do BLE or WiFi – over WiFi, you get a nice web UI showing you the data collected so far, and letting you send arbitrary data. It can do Wiegand like quite a few open-source projects, but it can also do arbitrary clock+data protocols, plus you can just wire it up quickly, and it will figure out the encoding.

We could imagine such a board inside a Cyberpunk DnD rulebook or used in Mr Robot as a plot point, except that this one is real and you can use it today for red teaming and security purposes. Not to say all applications would be NSA-catalog-adjacent pentesting – you could use such a bug to reverse-engineer your own garage door opener, for one.

Low-Resolution Fluid Simulation On An ESP32

Fluid simulations are a key tool in fields from aerospace to motorsports and even civil engineering. They can be three-dimensional and complicated and often run on supercomputer clusters bigger than your house. However, you can also do simple two-dimensional fluid simulations on very simple hardware, as [mircemk] demonstrates.

This build is almost like a simple toy that displays particles rolling around and tumbling as you turn it one way or the other. Behind the scenes, an ESP32 is running the show, simulating a group of particles responding to gravity in a fluid-like manner. The microcontroller is  hooked up with an 3-axis gyroscope and accelerometer, which it uses to track motion and influence the motion of the particles in turn. The results of the simple fluid simulation are displayed on a screen made up of a 16 x 16 matrix of WS2812B addressable RGB LEDs, which add enough color to make the build suitably mesmerizing.

There’s something compelling about turning the display and watching the particles tumble and flow, particularly when they’re all set to different colors. [mircemk] also gave the build the ability to operate in several different modes, running “sand,” “liquid” and “gas” simulations and with dynamic coloring to boot.

We’ve seen some great videos from [mircemk] before, too, like this sensitive metal detector rig. Continue reading “Low-Resolution Fluid Simulation On An ESP32”

The rust language logo being branded onto a microcontroller housing

Esp-hal, A Stable-API ESP32 HAL Gift For Your Rust Code

Looking to write Rust on the ESP32? You’re in luck, a new challenger has entered the scene, looking to help you write code that lasts – [Scott Mabin] and the team from Espressif have brought us the esp-hal 1.0.0-beta. From a personal project to an Espressif-sponsored one to an effort under Espressif’s wing, [Scott] tells us about the arduous journey of bringing first-class Rust support to ESP32 chips, Xtensa and RISC-V alike.

In particular, esp-hal, with the hal part standing for Hardware Abstraction Layer, focuses on providing you with a stable API to access hardware, making sure your code can remain stable for years to come. For now, you get drivers for GPIO, UART, SPI and I2C, as well as a number of auxiliary features like time and SoC reset, more than enough for a large amount of projects we hackers build with a generic MCU in mind.

Next stop? WiFi and BLE support, of course, an ESP32 just doesn’t feel the same without these two. Rust is a fun and seriously promising language, and it’s a joy to use! So, if you have a wireless-less project in mind and you’re looking for a HAL, try out the esp-hal, it might just be exactly what you need.

If you’re looking for examples, here’s an STM32 touchpad project with Rust firmware, a PIC32 Rust blinky demo, and we’ve even featured larger projects like this ESP32 open-source (reverse-engineered) WiFi MAC stack being written in Rust. In case you missed it, we’ve introduced Rust to you a couple of times, even as far as 2015!

3D Print Yourself A Split Flap Display

Split flap displays! They’re mechanical, clickety-clackity, and largely commercially irrelevant in our screen-obsessed age. That doesn’t mean you can’t have a ball making one of your own, though! [Morgan Manly] did just that, with tidy results.

An ESP32 C3 SuperMini serves as the boss of the operation, running the whole display. The display is designed to be modular, so you can daisy chain multiple characters together to spell longer words. Each module has 37 characters, so it can display the alphabet, numerals 0 to 9, and a blank. Each module contains a 28BYJ-48 stepper motor for controlling the flaps, and a ULN2003 driver board to run it and a PCF8575 IO expander to handle communciation. An A3144 hall effect sensor is also used for positional feedback to ensure the display always shows the right character. The flap mechanism itself is relatively straightforward—a drum with all 37 flaps is until the correct character is reached, with the blank flaps hosting a magnet to trigger the aforementioned hall effect sensor. The flaps themselves are 3D-printed, with filament changes used to color the characters against the background.

If you’ve ever dreamed of building a flap-display clock or ticker, you needn’t dream of finding the perfect vintage example. You can just build your own! The added bonus is that you can make it as big or as small as you like. We’ve seen some interesting variations on the split flap concept recently, too. If you’re cooking up your own kooky electromechanical displays, don’t hesitate to let us know!