Eenk Provides EInk, ESP32 Powered Text Adventures

There’s a niche genre of text adventure that’s halfway between a traditional novel and a videogame. Think Zork if it had an extra few novels worth of words of well-crafted story to go with the action. [t0mg] is a fan of such adventures, and also quite enjoys carrying around his palm-sized ESP32 powered Xteink e-ink reader, so decided to create a project to merge the two interests, called eeink.

The Xteink readers have gotten popular lately because their modest internals and size make them very affordable. Not to mention hackable, since they’re basically an ESP32-C3 e-ink dev board that comes with a nice case and battery. The X4 Pro notably comes with an ESP32-S3 which means a lot more RAM, but this project targets both that and the X3/X4 that use the C3 version. Using the C3 means working within some rather stringent limits, as Xteink didn’t spring for any PSRAM, so [t0mg] had less memory to work with than folks did in the 80s.

This project is specifically focused on adventures using the scripting language ink, and comes with its own IDE called eenky to roll your own choose your own adventure book. It’s all on GitHub under an MIT license, and if you want to see it in action there’s a demo video embedded below.

Speaking of Zork, it wasn’t just the first commercial text adventure; it brought some important technological innovations, too.

Continue reading “Eenk Provides EInk, ESP32 Powered Text Adventures”

Simple DIY STM32 Oscilloscope Project

In part one of what is intended to be a series on developing an STM32-based oscilloscope, [BTTLab] demonstrates a how to use the built-in ADC of an STM32F207 MCU to develop a straightforward single-channel oscilloscope. This can be followed along both via the YouTube video and the GitHub repository for this single-channel version.

Oscilloscope front-end protections. You want this. (Credit: BTTLab, YouTube)
Oscilloscope front-end protections. You want this.

Of course, an MCU’s ADC generally won’t hold a candle to a dedicated ADC for oscilloscope purposes – along with the typical beefy FPGA-based processing – with even a basic Rigol DS1054Z hitting a cool 1 GSPS, but the 2 MSPS at 12-bit resolution achieved by an STM32F207 isn’t shabby either. For more basic, low-frequency circuit and protocol debugging it would already be enough.

One thing briefly touched upon in the video is the front-end. The ADC’s inputs are rated for a specific voltage range, typically 0 to 3.3 V when running the MCU off 3.3 V, so you do not want to put higher or negative voltages into said ADC input. This is where measuring something like AC becomes rather tricky and you can get some exciting releases of magic smoke.

The demonstrated single-channel oscilloscope firmware uses the ST HAL, so it might be somewhat easy to target other STM32 MCUs as well, though naturally ADC performance will differ per MCU family and sometimes sub-family, so make sure to read the datasheet and programming manual before you dive in too deep.

Continue reading “Simple DIY STM32 Oscilloscope Project”

Scanning For Lifesigns With ESP32 And Raspberry Pi

It’s a sci-fi trope that you can ‘scan for life signs’ and detect if there are humans — or suspiciously human-shaped aliens — present, but in real life it’s harder than that. [The Masked Bear]’s wifisense-pi project isn’t really scanning for signs of life, either, unless you happen to consider breathing a sign of life. Even then, it’s not detecting breathing per se, but the subtle motion that goes with it: it’s a very sensitive motion detector that relies on the fact that we fleshy bags of goo disturb WiFi signals with our presence, and motion alters those disturbances.

The device uses an ESP32-S3 to measure the radio channel 100 times per second, while a Raspberry Pi 4 provides the signal processing muscle. It can detect the slightest motions, and even determine the presence of a perfectly still human by their breathing, though you can hide your presence for as long as you can hold your breath.

A single sensor, no matter how sensitive, cannot give position information, and while multiple humans will distort WiFi more than a single one, [The Masked Bear] reports you cannot reliably extract that signal. So this project answers the question: “are there humans in this room?” Or, even more likely, “are there any large breathing animals in this room?” We can’t imagine a 50 kg Mastiff looking any different to this sensor than an equivalent mass of quivering human flesh.

Before you dismiss this as just another motion sensor, keep in mind that it is sniffing the signals already present on the 2.4 GHz band, and, like the WiFi signals themselves, it can work through walls. So we think it’s pretty nifty.

Of course, there are many other ways to detect humans, from machine-learning cameras to millimeter-wave sensors to a simple PIR. This isn’t the first project we’ve seen that uses WiFi like this. It isn’t even the first with an ESP32, but it’s an interesting implementation worth checking out.

ESP32 Music Sequencer Is Clearly Nailing The Y2K Aesthetic

Do you remember back when electronics came in clear cases? Back around the turn of the millennium, when translucency was chic. [3DSage] sure does, which is why he went to great lengths to make a clear case for his Clear Retro Music Sequencer.

The sequencer itself is based around an ESP32-S3 module with a built-in display, and a rotary encoder that handles most of the input. Most, because there’s a second button and a stylophone-like array of brass rods on one edge of the custom PCB he made with his fiber laser that can also handle note input. Other notable features include a phono jack with built-in switching so the tunes come out automatically from headphones or the internal speaker, and a AAA battery-lookalike. It’s a small detail, but that 666 mWh 3.7 V lithium cell is the demon’s meow for this project, seeing as it gives the convenience of a modern battery without compromising that Y2K look — remember you can see the battery through the translucent case.

About that translucent case: it’s 3D printed out of PETG, with settings similar to those we’ve reported on before: hot, slow, and don’t cross the streams! Which is to say every layer must line up with the one above. Oh, use filament fresh out of the drier of you live somewhere as humid as [3DSage]. The result is not totally see-through, but an application of clear enamel fills in the surface well enough to read through, giving the vintage look [3DSage] was after. To complete that Y2K feel, he turns the device into a slap bracelet, because why not? For those of you who missed due to the aforementioned federal prison arc, slap-on wristbands were all the rage amongst the kids back in those days.

The wristband is a length of measuring tape at its core, the springy steel having been cold-worked to hold the radius of [3DSage]’s wrist in its relaxed state, encapsulated in clear gorilla tape for comfort. We probably don’t have to tell you that getting slapped with a raw tape measure isn’t the nicest. For the actual operation of the sequencer, check out the video embedded below — the first 9 minutes cover the build, while the rest shows off the product.

Of course you don’t need an ESP32 for this kind of music maker– you can do it with a C64, or even discrete parts and rope-core memory. 

Continue reading “ESP32 Music Sequencer Is Clearly Nailing The Y2K Aesthetic”

Read A USB Logitech Racing Wheel On An ESP32‑S3

Now that MCUs like the ESP32-S3 are quite capable computer systems including USB host functionality, it only makes sense that you can connect USB peripherals like Logitech racing wheels to them. Of course, these aren’t basic HID USB devices, so they require a bit of setup to make them start spitting out the data updates which we’re interested in. Making this process easy is the goal of the LogiWheelHost project for ESP32-S3 by [Joel Kometz].

This single-header library supports the G29, G923, G920, G27, G25, DFGT, Driving Force Pro wheels, building on top of the EspUsbHost project. As explained in the README, these racing wheels do not start streaming all updates to their controls once powered on, but boot into a restricted mode in which only neutral or combined-axis data is sent.

To change this you need to trigger the so-called native mode switch in which far more detailed information as well as updates on extended features like separate pedals, all buttons and the gear shifter become available. This is done by sending a HID output report to the USB device, which is easy enough.

In addition to handling this detail the library also provides an API using which obtaining and using these controller states in your own code should be quite easy. Presumably the library will work on or can be ported to other ESP32 MCUs that support host USB mode, so this might be good news for anyone who is looking to do more with that old Logitech racing wheel.

Grading Tomatoes With An ESP32 And ML

If you’ve ever worked with produce, you might know about grading. In addition to deciding if, say, a strawberry is good or not, they also have to sort them by color. Turns out, you don’t care if one package of berries is a bit redder than another, but you do care if one package has too much color variation. [Pmalfa31] applied an ESP32 and machine learning to grading tomatoes.

The system knows in advance if you are processing standard tomatoes or cherry tomatoes and uses two different sets of learned data depending on which you select. The program receives raw data from an optical sensor and then processes it to remove empty belt images, compute statistical information, and group readings for a single fruit together.

Continue reading “Grading Tomatoes With An ESP32 And ML”

Easy Theremin Uses ESP32

The Theremin is that classic electronic musical instrument that makes those weeee-ohhhhh noises which were so popular in mid-century science fiction movies. Mid-last-century, that is, because this century is just beginning. In any case, you could build one with old-school analog electronics, or you could go a more modern route, as [ericCycles] did.

The build relies almost entirely on an ESP32 microcontroller with minimal supporting circuitry. Like any other Theremin, pitch and volume are controlled by moving hands closer or farther away from two antenna. In this case, the ESP32 uses its capacitive touch circuitry to detect effectively detect hand proximity to the two antenna in question, and uses those values to control the pitch and volume of a synthesized waveform. That waveform is then pumped out over the onboard digital-to-analog converter for playback on external speakers.

If you want to build a simple Theremin-like instrument quickly and easily, it’s hard to beat the simplicity on offer here. We’ve featured some other fun variants over the years, too, like this version that uses time-of-flight sensors for the human interface.

Continue reading “Easy Theremin Uses ESP32”