Tiny Games Challenge: A Retro Racing Game On A 16×2 LCD

Sometimes, all it takes is a change in perspective to take something boring and make it fun. That’s true about 16×2 LCD; in its usual landscape format, it’s a quick and easy way to provide a character-based display for a project. But flip it 90 degrees and use a little imagination, and it can become a cool retro racing game that fits in the palm of your hand.

[arduinocelantano] has made it a habit to press the humble 16×2 character LCD into service in ways it clearly wasn’t intended to support, such as playing Space Invaders and streaming video on it. Both of these projects seem to inform the current work, which was one of the first entries in our current Tiny Games Challenge contest. The racing game requires multiple sprites to animate the roadway and the cars, using six “layers” of eight custom characters and rapidly switching between them to create the appearance of movement. The video below has a brief sample of gameplay.

Flipping the display on its side makes for a somewhat limited game — it’s all straightaway, all the time — but that could probably be fixed. [arduinocelentano] suggests scaling it up to a 16×4 to include curves, but we’d bet you could still simulate curves on the upper part of the game field while leaving the player’s car fixed on a straight section. Higher difficulties could be achieved by moving the curved section closer to the player’s position.

Sure, it’s limited, but that’s half the charm of games like these. If you’ve got an idea for our Tiny Games Challenge, head over to our contest page and let us know about it. We’re keen to see what you come up with.

Continue reading “Tiny Games Challenge: A Retro Racing Game On A 16×2 LCD”

Responsive LCD Backlights With A Little Lateral Thinking

LCD televisions are a technological miracle, but if they have an annoying side it’s that some of them are a bit lacklustre when it comes to displaying black. [Mousa] has a solution, involving a small LCD and a bit of lateral thinking.

These screens work by the LCD panel being placed in front of a bright backlight, and only letting light through at bright parts of the picture. Since LCD isn’t a perfect attenuator, some of the light can make its way through, resulting in those less than perfect blacks. More recent screens replace the bright white backlight with an array of LEDs that light up with the image, but the electronics to make that happen are not exactly trivial.

The solution? Find a small LCD panel and feed it from the same HDMI source as a big panel. Then place an array of LDRs on the front of the small LCD, driving an array of white LEDs through transistor drivers to make a new responsive backlight. We’re not sure we’d go to all this trouble, but it certainly looks quite cool as you can see below the break.

This may be the first responsive backlight we’ve brought you, but more than one Ambilight clone has graced these pages.

Continue reading “Responsive LCD Backlights With A Little Lateral Thinking”

Go Forth With This Portable Programmer

When choosing a low-level language, it’s hard to beat the efficiency of Forth while also maintaining some amount of readability. There are open source options for the language which makes it accessible, and it maintains its prevalence in astronomical and other embedded systems for its direct hardware control and streamlined use of limited resources even though the language started over 50 years ago. Unlike 50 years ago, though, you can now take your own self-contained Forth programmer on the go with you.

The small computer is built on a design that [Dennis] built a while back called my4TH which has its own dedicated 8-bit CPU and can store data in a 256 kB EEPROM chip. Everything else needed for the computer is built in as well but that original design didn’t include a few features that this one adds, most notably a small 40×4 character LCD and a keyboard. The build also adds a case to tie everything together, with ports on the back for I2C and power plus an RS232 port. An optional battery circuit lets the computer power up without an external power supply as well.

Continue reading “Go Forth With This Portable Programmer”

Pixel Graphics From An HD44780, By Cutting Wires

[Felipe Tavares] wasn’t satisfied with the boring default fonts on an HD44780-based display. And while you can play some clever tricks with user-defined characters, if you want to treat the display as an array of pixels, you’ve got to get out your scalpel and cut up a data line.

The hack builds on work from [MisterHW] who documented the bits going from the common display driver to the display, and suggested that by cutting the data line and sending your own bits, you could send arbitrary graphics. The trick was to make sure that they’re in sync with the display, though, which means reading the frame sync line in user code.

This done, it looks like [Felipe] has it working! If you can read Rust for the ESP32, he has even provided us with a working demo of the code that makes it work.

We can’t help but wonder if it’s not possible to go even lower-level and omit the HD44780 entirely. Has anyone tried driving one of these little LCD displays directly from a microcontroller, essentially implementing the HD44780 yourself?

Any way you slice it, this is a cool hack, and it opens up the doors to DOOM, or as [MisterHW] suggests, Bad Apple on these little displays . If you do it, we want to see it.

If your needs aren’t so exotic, the classic HD44780 display is a piece of cake to get working, and an invaluable tool in anyone’s toolbox.

A multifactor authentication device showing TOTP codes

An ESP32 MultiFactor TOTP Generator

MFA, or multifactor authentication, is a standard security feature these days. However, it can be a drag to constantly reach into one’s pocket, scroll to Google Authenticator (other MFA applications are available!), and find the correct TOTP code to log in to a site for a short while. [Allan Oricil] felt this pain point, so they took the problem by the horns and created a desktop MFA TOTP generator to make life just that little bit easier.

TOTP, which stands for Time-based One-Time Password, is a security measure that uses a device or application to provide unique codes that expire after a short time. Two-factor authentication requires a physical item (something you have), such as a key or swipe card, and knowledge of a fact (something you know), like a password, rather than relying on a single factor. This approach ensures a higher level of security. [Allan]’s project is a physical thing one would use with a password or key file.

Continue reading “An ESP32 MultiFactor TOTP Generator”

Alarm Panel Hack Defeats Encryption By Ignoring It

As frustrating as it may be for a company to lock you into its ecosystem by encrypting their protocols, you have to admit that it presents an enticing challenge. Cracking encryption can be more trouble than it’s worth, though, especially when a device gives you all the tools you need to do an end-run around their encryption.

We’ll explain. For [Valdez], the encrypted communication protocols between a DSC alarm panel and the control pads on the system were serious impediments to integration into Home Assistant. While there are integrations available for these alarm panels, they rely on third-party clouds, which means that not only is your security system potentially telling another computer all your juicy details, but there’s also the very real possibility that the cloud system can either break or be shut down; remember the Chamberlain MyQ fiasco?

With these facts in mind, [Valdez] came up with a clever workaround to DSC encryption by focusing on physically interfacing with the keypad. The device has a common 16×2 LCD and a 25-key keypad, and a little poking around with a multimeter and a $20 logic analyzer eventually showed that the LCD had an HD44780 controller, and revealed all the lines needed to decode the display with an ESP32. Next up was interfacing with the keypad, which also involved a little multimeter work to determine that the keys were hooked up in a 5×5 matrix. Ten GPIOs on the ESP32 made it possible to virtually push any key; however, the ten relays [Valdez] originally used to do the switching proved unwieldy. That led to an optocoupler design, sadly not as clicky but certainly more compact and streamlined, and enabling complete control over the alarm system from Home Assistant.

We love this solution because, as [Valdez] aptly points out, the weakest point in any system is the place where it can’t be encrypted. Information has to flow between the user and the control panel, and by providing the electronic equivalents to eyes and fingers, the underlying encryption is moot. Hats off to [Valdez] for an excellent hack, and for sharing the wealth with the HA community.

Oddball LCDs Reverse Engineered Thanks To Good Detective Work

Is there anything more discouraging to the reverse engineer than to see a black blob of epoxy applied directly to a PCB? We think not, because that formless shape provides no clue as to what chip lies beneath, and that means a lot of detective work if you’re going to figure out how to use this thing.

[Sudhir Chandra]’s detective story starts with a bunch of oddball LCDs, slim 1×32 character units rather than the more familiar 2×16 displays. Each bore the dreaded black COB blob on the back, as well as a handful of SMD components and not much else. Googling revealed no useful documentation, and the manufacturer wasn’t interested in fielding calls from a hobbyist. Reasoning that most manufacturers wouldn’t spin up a custom chip for every display, [Sudhir] assumed there was an ST7066, a common LCD driver chip, underneath the blob, especially given the arrangement of external components. But a jumper set was bodged together under this assumption didn’t get the display going.

Next up were more destructive methods, to decap the COB and see what kind of numbers might be on the chip. Sandpaper worked at first, but [Sudhir] eventually turned to the “Chips a la [Antoine]” method of decapping, which uses heat and brute force to get at the goods. This got down to the chip, but [Sudhir]’s microscope wasn’t up to the task of reading the die markings.

What eventually cracked the case was tracing out the voltages across the various external resistors and matching them up to other chips in the same family as the ST7066, plus the realization that the long, narrow epoxy blob probably covered a similarly shaped chip, which led to the culprit: an ST7070. This allowed [Sudhir] to build an adapter PCB for the displays, with plans for a custom Arduino library to talk to the displays.

This was a great piece of reverse engineering and a good detective story to boot. Hats off to [Sudhir] for sticking with it.