Playing Mario on an Oscilliscope

Any display can be connected to a microcontroller and used as a display if you know the protocol to use and have enough power in your micro. Sometimes, an odd display is used just “because it’s there.” This seems to be the case for Reddit user [phckopper], who has used a STM32 and a PS2 joystick to play a version of a Mario game on an oscilloscope.

There’s not many technical details but [phckopper] lets us know that the rendering is done using the SPI on the STM, transferred via DMA, which is synchronized to two saw-tooth waves that are fed in to the X and Y axes of the oscilloscope.  The Z axis, which controls the brightness of the dot, is fed from the MOSI. By making the oscilloscope range all over the screen, similar to the way a CRT’s gun does, [] is able to draw sprites, rather than vector graphics. The display has a resolution of 400×400 and each sprite is 16×16. The input is from a PS2 joystick connected to [phckopper]’s PC, with the information communicated over UART using a simple protocol.

We don’t get to see much of the game in the video after the break, but it’s a pretty impressive job nonetheless, especially when you realize that [phckopper] did this project when he was just sixteen! There are a couple of other oscilloscope projects here at Hackaday, like this one, a great version of pong played on the ‘scope, or this one, showing off some great graphics.

Continue reading “Playing Mario on an Oscilliscope”

A Digital LCD Makeover For An Analogue CRT Spectrum Analyser

[Seb Holzapfel, VK2SEB] has a rather nice spectrum analyser, a Hewlett Packard 141T. It’s an entirely analogue instrument though, so it lacks some of the sophisticated features you might expect to see on its modern counterparts.

One feature the HP does have is a vertical deflection output that in effect allows the trace to be reproduced on an oscilloscope. [Seb] has taken that and applied it to an STM32F746 Discovery board with its associated LCD touchscreen to produce an interface for the HP that includes modern features such as trace normalisation and a waterfall view. Along the way he’s had to make a voltage level converter to render the HP’s scan output into a range acceptable for the ST board.

He goes into detail on his software for the project, which he is at pains to remind us is still very much a work in progress. He notes that the HP has a range of other outputs (on those “D” sockets that include co-axial connectors) that provide information about its band and scan settings, so there is ample possibility for further customisation.

If you are interested in this project then the code is all available via GitHub, otherwise you can watch his video below the break. He’s labelled it as “Part 1”, so we look forward to more on this project.

Continue reading “A Digital LCD Makeover For An Analogue CRT Spectrum Analyser”

Take the Blue Pill and Go Forth

Forth has a long history of being a popular hacker language. It is simple to bootstrap. It is expressive. It can be a very powerful system. [jephthal] took the excellent Mecrisp Forth and put it on the very inexpensive STM32 “blue pill” board to create a development system that cost about $2. You can see the video below.

If you have thirty minutes, you can see just how easy it is to duplicate his feat. The blue pill board has to be programmed once using an STM32 programmer. After that, you can use most standard Forth words and also use some that can manipulate the low-level microcontroller resources.

Continue reading “Take the Blue Pill and Go Forth”

STM32CubeMX Makes Makefiles

When hardware manufacturers make GUI code-generation tools, the resulting files often look like a canned-spaghetti truck overturned on the highway — there’s metaphorical overcooked noodles and red sauce all over the place. Sometimes we think they’re doing this willfully to tie you into their IDE. Not so the newest version of ST’s graphical STM32CubeMX, which guides you through a pleasant pin-allocation procedure and then dumps out, as of the latest version, a clean Makefile.

Yes, that’s right. This is a manufacturer software suite that outputs something you can actually use with whatever editor, GUI, compiler, or environment that you wish — even the command line. Before this release, you had to go through a hacky but functional script to get a Makefile out of the CubeMX. Now there’s official support for real hackers. Thanks, ST!

If you’re compiling on your own, you’ll need to update the BINPATH variable to point to your compiler. (We use the excellent GNU ARM Embedded Toolchain ourselves, which is super-easy to install on almost any Linux.) If you want to use STM32CubeMX with the Eclipse IDE, [kali prasad yadav] sent us PDF instructions — it’s not hard.

If you doubt that the availability of a free, open, and non-constraining toolchain can matter for a silicon vendor, we’d point to AVR and the Arduino platform that spun off of their support of GCC. Sure, Atmel still pushes their all-in-one wonder, Atmel Studio, which is better than the Arduino IDE by most any metric. But Studio is closed, and Arduino is open. We’d love to see the number of Studio users compared with Arduino users.

Congratulations to ST for taking a big step in the right, open-toolchain, direction.

Badge from Diamond Age Comes to DEF CON

We’re huge fans of [Neal Stephenson’s] work and are usually looking to assign some of his vision to the gear that pops up in the real world. But there’s no stretching or squinting necessary with this one. [Kerry Scharfglass] has built a functioning Drummer’s Badge from the foundational Sci-Fi novel The Diamond Age.

The badge is called Sympetrum, which is a genus of dragonfly. In explaining what the badge is and does, [Kerry] instructs you to go and read the book first and we couldn’t agree more. This isn’t recommended reading; if you’re a geek you need to read this book.

The dragonfly badges are from a portion of the book that gets pretty weird, but the gist is that rod-logic (machines build from microscopic carbon nanotubes) is so pervasive that at all times you’re covered in mites that are actually machines. At a party, one of the characters notices everyone is wearing dragonfly pins that begin to pulse with the music and synchronize with each other. They’re actually indicators of what the mites within the wearers’ bodies are doing — synchronizing people with other people.

This badge is a working recreation of that, presumably without the billions of mites controlling people (but who knows, it is DEF CON). At the center of the badge is an STM32 driving ten APA102 modules. Interactivity is based on IR signaling. The badge will cycle random color animations when alone. But each badge also projects clock sync and metadata over infrared, so put some of them in the same room and they’ll tend to synchronize.

Simple, beautiful, and a great geeky backstory. This example of Badgelife proves that hardware badges don’t need to be packed with features, or have a huge BOM cost. If done well, you can do an awful lot with just a little hardware and strong dose of inspiration. It also makes hand-assembly a lot more approachable, which is what you can see in the images above. Thanks [Kerry] for giving us an early look at this badge, can’t wait to see them at the CON.


We’ll be looking for this and all other #Badgelife offerings at DEF CON 25. Join us for a Hackaday meetup on Sunday morning as we once again do Breakfast at DEF CON

Hackaday Prize Entry: Oscilloscope for the Masses

If you head down to your local electronics supply shop (the Internet), you can pick up a quality true-RMS multimeter for about $100 that will do almost everything you will ever need. It won’t be able to view waveforms, though; this is the realm of the oscilloscope. Unlike the multimeter’s realistic price point, however, a decent oscilloscope is easily many hundreds, and often thousands, of dollars. While this is prohibitively expensive for most, the next entry into the Hackaday Prize seeks to bring an inexpensive oscilloscope to the masses.

The multiScope is built by [Vítor] and is based on the STM32-O-Scope which is built around a STM32F103C8T6 microcontroller. This particular chip was chosen because of its high clock speed and impressive analog-to-digital resolution, which are two critical specifications for any oscilloscope. This particular scope has an inductance meter built-in as well, which is another feature which your otherwise-capable multimeter probably doesn’t have.

New features continue to get added to this scope by [Vítor]. Most recently he’s added features which support negative voltages and offsets. His particular scope is built inside of a model car, too, but we believe this to be an optional feature.

Digital Clock Goes with the Grain

This good-looking clock appears to be made out of a block of wood with LED digits floating underneath. In reality, it is a block of PLA plastic covered with wood veneer (well, [androkavo] calls it veneer, but we think it might just be a contact paper or vinyl with a wood pattern). It makes for a striking effect, and we can think of other projects that might make use of the technique, especially since the wood surface looks much more finished than the usual 3D-printed part.

You can see a video of the clock in operation below. The clock circuit itself is nothing exceptional. Just a MAX7218 LED driver and a display along with an STM32 ARM processor. The clock has a DHT22 temperature and humidity sensor, as well as a speaker for an alarm.

Continue reading “Digital Clock Goes with the Grain”