Bridging The PC And Embedded Worlds With Pico And Python

Although protocols like I2C and SPI are great for communicating between embedded devices and their peripherals, it can be a pain to interface these low-level digital interfaces to a PC. [Alexandre] typically used an Arduino to bridge between the PC and embedded worlds, but he got tired of defining a custom serial protocol for each project. Inspired by MicroPython’s machine module, [Alexandre] has developed u2if—an implementation of some of MicroPython’s machine module for PC—using a USB-connected Raspberry Pi Pico to bridge between a PC and low-level digital interfaces.

u2if consists of two parts: the PC portion is a Python implementation of a portion of the MicroPython machine module, and the Raspberry Pi Pico receives some custom C++ firmware. Thus far, [Alexandre] has implemented functionality for the onboard ADCs, I2C, SPI, UART, and GPIO lines as well as additional support for I2S sound and the WS2812B addressable LED.

Development board for Raspberry Pi Pico.

In addition to the u2if package, [Alexandre] has designed a PCB to break out all of the Raspberry Pi Pico’s interfaces in a handy 3×3.9″ board. We especially like that multiple headers are supplied for I2C, including one with enough space to mount an SSD1306 OLED display.

We think this could be an incredibly useful tool, and what makes it even more impressive is that it uses a board many of us already have laying around. If you want a dedicated device for interfacing with low-level digital buses, you may want to check out the GreatFET.

Arduboy FX Mod-Chip: Now You’re Playing With Power

Traditionally, a forum full of technical users trying integrate their own hardware into a game system for the purposes of gaining unfettered access to its entire software library was the kind of thing that would keep engineers at Sony and Nintendo up at night. The development and proliferation of so called “mod chips” were an existential threat to companies that made their money selling video games, and as such, sniffing out these console hackers and keeping their findings from going public for as long as possible was a top priority.

But the Arduboy is no traditional game system. Its games are distributed for free, so a chip that allows users to cram hundreds of them onto the handheld at once isn’t some shady attempt to pull a fast one on the developers, it’s a substantial usability improvement over the stock hardware. So when Arduboy creator Kevin Bates found out about the grassroots effort to expand the system’s internal storage on the official forums, he didn’t try to put a stop to it. Instead, he asked how he could help make it a reality for as many Arduboy owners as possible.

Now, a little less than three years after forum member Mr.Blinky posted his initial concept for hanging an external SPI flash chip on the system’s test pads, the official Arduboy FX Mod-Chip has arrived. Whether you go the DIY route and build your own version or buy the ready-to-go module, one thing is for sure: it’s a must-have upgrade for the Arduboy that will completely change how you use the diminutive handheld.

Continue reading “Arduboy FX Mod-Chip: Now You’re Playing With Power”

Logic Meter Aims To Make Hobby Electronics Troubleshooting Easier

The basic test instrument suite — a bench power supply, a good multimeter and perhaps an oscilloscope — is extremely flexible, but not exactly “plug and play” when it comes to diagnosing problems with some common hardware setups. A problem with a servo driver, for example, might be easy enough to sort of with a scope, but setting everything up to see what’s going on with the PWM signal takes some time.

There’s got to be a better way to diagnose hobby electronics woes, and if [Bob Alexander] has his way, his “Logic Meter”, or something very close to it, will be the next must-have bench tool. The Logic Meter combines some of the functionality of an oscilloscope and a logic analyzer into a handy instrument that’s as easy to use as a multimeter. The Logic Meter’s probes connect to logic-level signals in a circuit and can be set up to capture or send serial data, either directly to or from a UART or via an SPI bus connection. There are also functions for testing servos and similar devices with a configurable PWM output. [Bob] rounds out the functionality with a GPS simulator and a simple logic analyzer, plus some utility functions.

The beauty part of the Logic Meter is that [Bob] has left where it goes next largely up to the community. He’s got a GitHub repo with details on the PIC32-based hardware, and the video below makes it clear that this is just a jumping-off point to further work that he hopes results in a commercial version of the Logic Meter. That’s a refreshing attitude, and we hope it pays off; from the look of a few of [Bob]’s retrocomputing makeovers, something like the Logic Meter could come in pretty handy.

Continue reading “Logic Meter Aims To Make Hobby Electronics Troubleshooting Easier”

A Novel Micro Desktop Display For Your Raspberry Pi

Since its debut back in 2012 there have been a variety of inventive displays used with the Raspberry Pi. Perhaps you remember the repurposed Motorola phone docks, or you have one of those little displays that plugs into the expansion port. Inevitably the smaller options become disappointing as desktop displays, because while the advert triumphantly shows them sporting a Raspberry Pi OS desktop the reality is almost unusable. Until now.

Along comes [igbit] with a solution in the form of a little SPI display with a different approach to displaying a desktop. Instead of displaying a matchbox-sized desktop over the whole screen it divides into two halves. At the top is a representation of the desktop, while below it is a close-up on the area around the mouse pointer.

Unexpectedly its mode of operation is very accessible to the non-Linux guru, because it works through a Python script that takes screenshots of both areas and passes them as a composite to the display. An area the size of the magnified window is drawn around the mouse pointer, allowing it to be easily located on the tiny desktop. It relies on the main display being pushed to the HDMI output, so if the Pi is otherwise headless then its configuration has to be such that it forces HDMI use. The result isn’t something that would help you with the more demanding desktop tasks, but it provides a neat solution to being able to use a Pi desktop on a tiny screen.

Of course, in a pinch you can always use your mobile phone.

Scratching That Itch

I did something silly. I bought a lot of ten “broken” cheesy indoor quadcopters on eBay — to hopefully cobble one working one together and to amuse my son. At this point, I’ve got eight working. The bad news is that they all come with dirt-cheap transmitters that aren’t really conducive to flying at all. They’d be a lot more fun if they could be controlled with a real remote. Enter the hackers.

Most all of the cheap quads are based on one of a handful of radio chipsets, although they use different protocols. An enterprising hacker could conceivably just bundle together this handful of radio modules, and the rest would be a simple matter of software. That’s exactly what Pascal Langer’s DIY Multiprotocol TX and supporting firmware does. This hobby project was so successful that compatible hardware is manufactured by more than a few Chinese companies, and non-geeks have them installed in their radios. The module lets you control virtually anything that uses 2.4 GHz. Of course, I’ve got one of them.

I opened up the cheesy drone’s transmitter, found that it used a popular chipset, and worked through all the different supported protocols that used it. No dice. But the radio module did have nicely labeled SPI lines, so I reached out to Pascal. A couple of Sigrok sessions later, he’d figured out that it was trying to bind on a different channel, I’d recompiled the firmware, and was playing with the drone’s other functions.

I just love a good SPI-sniffing session. sigrok-cli -d fx2lafw -c samplerate=4000000 -P spi:clk=D0:mosi=D1:cs=D2 -A spi="mosi transfer" --continuous | grep A0 | uniq reads the SPI lines, decodes the packets, filters out the commands, and removes duplicates, in real-time. All that’s left to do is wiggle the sticks, mash buttons, and take good notes.

None of this was hard, and certainly none of it was expensive. I got my drones under the control of my fancy-schmancy remote, and have a good foothold into controlling them algorithmically later on thanks to everyone’s previous work on reverse engineering these protocols. Support for DF Drone’s SkyTumbler will be included in the next DIY Multiprotocol TX release, and I spent about four or five pleasant hours on this project. Maybe only a handful of people will stumble on this particular protocol — or maybe it will just be me. I did it mostly just to scratch my own particular itch.

But that’s one way open source works, thrives, and grows. Here’s to you all out there, from the Deviation team, who did a lot of the early drone protocol reverse engineering, to Pascal for the DIY Module, to the Sigrok folks who made the tools accessible for me to piggyback on everyone’s previous work. Keep on hacking!

Handheld Pong On A 6502

Recreating the arcade smash hit Pong in a device small enough to plug into a home television was a considerable technical challenge back in 1975. Of course, a big part of that was the fact that it needed to be cheap enough that consumers would actually buy it. But had money been no object, the Vectron Handheld by [Nick Bild] shows what a dedicated Pong board based on the 6502 CPU and 7400-series logic could have looked like.

Prototyping the Vectron Handheld

Well, aside from the display anyway. While [Nick] made sure to use components that were contemporaries of the 6502 wherever possible, he did drop in a modern SPI LCD panel. After all, it’s supposed to be a portable game system.

Though as you can see in the video after the break, the massive 273 mm x 221 mm PCB only just meets that description. Incidentally, there’s no technical reason for the board to be this big; [Nick] was just playing it safe as he’s still learning KiCad.

Those with a keen eye towards 6502 projects likely saw the breadboard version of the Vectron that [Nick] put together last year. Compared to the original, the circuit for the handheld has been considerably simplified as it wasn’t designed to be a general purpose 6502 computer. Whether or not you think being able to play Pong on it makes up for those shortcomings is a matter of personal preference.

Continue reading “Handheld Pong On A 6502″

A Cyclopic LCD Case For Your Raspberry Pi Server

If you’ve got a personal website that needs hosting or a few hundred gigabytes of files that could use a centralized storage location, the Raspberry Pi’s small size and extreme energy efficiency make it a compelling server choice compared to that curbside Pentium 4 box you’ve been trying to find a home for. All you need is something to put in.

Of course there’s no shortage of Pi case designs ready to be extruded from your 3D printer, but we recently found ourselves particularly taken with this unique one designed by [Ken Segler]. It’s not only small and sleek with a dash of futuristic flair, but it includes a front-mounted two inch 240 x 320 IPS display that connects to the Pi over SPI. At the minimum that gives you a way to see all those beautiful boot messages on startup, but with a little code, it could provide you with various system statics and status messages at a glance.

While the LCD is clearly the star of the show here, the case also has a few other nice features that make it worthy of your consideration. The magnetically attached fan filter on the the top, for one. The stacked layout that puts the Pi directly above the SSD also makes for a relatively compact final product.

One thing to note though is that [Ken] is using Power-over-Ethernet, meaning there’s no spot for a dedicated power jack on the case. It’s an easy enough feature to add into your own build, but naturally not everyone’s network is suitably equipped. In that case, beyond the normal annoyances of editing STL files, it shouldn’t be too much trouble to add one in without having to literally hack your way through the printed plastic.