A Power Button For Raspberry Pi, Courtesy Of Device Tree Overlays

As a standard feature of the Linux kernel, device tree overlays (DTOs) allow for easy enabling and configuration of features and drivers, such as those contained within the standard firmware of a Raspberry Pi system. Using these DTOs it’s trivial to set up features like as a soft power-off button, triggering an external power supply and enable drivers for everything from an external real-time clock (RTC) to various displays, sensors and audio devices, all without modifying the operating system or using custom scripts.

It’s also possible to add your own DTOs to create a custom overlay that combines multiple DTO commands into a single one, or create a custom device tree binary (DTB) for the target hardware. Essentially this DTB is loaded by the Linux kernel on boot to let it know which devices are connected and their configuration settings, very similar to what the BIOS component with x86-based architectures handles automatically.

Ultimately, the DTB concept and the use of overlays allow for easy configuration of such optional devices and GPIO pin settings, especially when made configurable through a simple text file as on the Raspberry Pi SBC platform.

Continue reading “A Power Button For Raspberry Pi, Courtesy Of Device Tree Overlays”

Turn Timing Diagrams Into ASCII Art, For Friendlier Pasting

We all use text-based fields at one time or another, and being limited to ASCII only can end up being a limitation. That’s what led [Luke Wren] to create asciiwave, a fantastic tool that turns WaveDrom timing diagrams into ASCII art. Unlike images, ASCII timing diagrams are suitable for pasting into comment fields, change logs, or anywhere else that accepts text only. [Update: As the author kindly shared in the comments below, this tool’s original niche is pasting into HDL (e.g. Verilog) source code comments, where it has a special kind of usefulness.]

WaveDrom itself is a nifty JavaScript tool that we have covered before. It accepts timing diagrams expressed as JSON data, and renders nicely-readable digital timing diagrams as images directly inside one’s browser.

As cool and useful as that is, images can’t be pasted into text fields. That’s where asciiwave comes in. It reads the exact same format that WaveDrom uses, but generates an ASCII-art timing diagram instead. So if you’ve found WaveDrom useful, but wish you could generate ASCII versions, here’s your solution.

Quick-Swap Socket For Stemma QT Experiments

[kmatch98] shares a quick hack with us over at Hackaday.io – a 3D-printed socket for Adafruit Stemma QT-based I2C modules. Since Adafruit has standardized the dimensions for their Stemma QT boards, it’s possible to make a socket that would fit many different sensors at once, where the board just slides in.

This reminds us of sci-fi datadisks, or, thinking of something more grounded in reality, game console cartridges – except that here, the fun you’re having is from exploring all the different devices you can get to speak I2C. To make such a socket, you only need to 3D-print two plastic parts, put a JST-SH plug between them, and screw them together – if you want to modify these to your liking, .f3d sources are available. Now you no longer have to use fingernails or tin snips to take the JST-SH plug out of your modules!

[kmatch98] is no stranger to sharing his projects on Hackaday.io with us, and we’ve covered some of his larger projects before, like this CircuitPython-powered cyber-duck cyberdeck, or the 3D-printable Maypole braider machine!