RGB LED Disco Ball Reacts To Sound And Color

Although disco music and dancing may be long dead, the disco ball lives on as a staple of dance parties everywhere. [Tim van de Vathorst] spent a considerable amount of time reinventing the disco ball into something covered with RGB LEDs that reacts to sound and uses a color sensor to change hue based on whatever it’s presented with.

[Tim] started by modeling the disco ball after a soccer ball with a mixture of pentagons and hexagons. Then it was off to the laser cutter to cut it out of 3mm plywood sheets. Once assembled, [Tim] added LED strips across all the faces and wired them up. Then it was time to figure out how to hold the guts together inside of the ball. Back to the drawing board and laser cutter [Tim] went to design a simple two-piece skeleton to hold the Raspberry Pi and the power supply.

In order to do some of the really interesting effects, [Tim] had to make sure that the faces were divvied up correctly in code. That was difficult and involved a really big array, but the result looks worth the trouble. Finally, [Tim] covered the ball in white acrylic to diffuse the LEDs. As you will see in the build/demo video after the break, the ball turned out really well. The only real problem is that the camera doesn’t work very well without light, which is something good parties are usually short on. [Tim] might add a spotlight or something in the future.

Do you prefer the mirrored look of the standard disco ball? Peep the tiny one in this Disco Containment Unit.

Continue reading “RGB LED Disco Ball Reacts To Sound And Color”

render of the Amiga juggler demo

The Juggler: In Rust

Back on the theme of learning to program by taking on a meaningful project — we have another raytracing demo — this time using Rust on the Raspberry Pi. [Unfastener] saw our previous article about writing a simple raytracer in spectrum BASIC and got inspired to try something similar. The plan was to recreate the famous juggler 3D demo, from the early days of 3D rendering on the Amiga.

The juggler story starts with an Amiga programmer called [Eric Graham] who created ssg, the first ray tracer application on a personal computer. A demo was shown to Commodore, who didn’t believe it was done on their platform, but a quick follow-up with the actual software used soon quelled their doubts. Once convinced, they purchased the rights to the demo for a couple of thousand dollars (in 1986 money, mind you) to use in promotional materials. [Eric] developed ssg into the popular Sculpt 3D, which became available also on Mac and Windows platforms, and kick-started a whole industry of personal 3D modelling and ray tracing.

Anyway, back to the point. [Unfastener] needed to get up the considerable Rust learning curve, and the best way to do that is to let someone else take care of some of the awkward details of dealing with GUI, and just concentrate on the application. To that end, they use the softbuffer and winit Rust crates that deal with the (important, yet frankly uninteresting) details of building frame buffers and pushing the pixels out to the window manager in a cross-platform way. Vecmath takes care of — you guessed it — the vector math. There’s no point reinventing that wheel either. Whilst [Unfastener] mentions the original Amiga demo took about an hour per frame to render, this implementation runs in real-time. To that end, the code performs a timed pre-render to determine the most acceptable resolution to get an acceptable frame rate, achieving a respectable 30 or so frames per second on a Pi 5, with the older Pis needing to drop the resolution a little. This goes to show how efficient Rust code can be and, how capable the new Pi is. How far we have come.

We saw another interesting rust-based raytracer a while back, which is kinda fun. We’ve also covered rust in other applications a few times, like inside the Linux kernel. Finally here’s our guide to getting started with rust, in case you need any more motivation to have a crack at this upcoming language.

For Today Only, Pi=3

In 1897 the state assembly of the American state of Indiana famously tried and failed to pass a bill which would have had the effect of denying the value of the mathematical constant Pi. It was an attempt to define a method to “square the circle”, or draw a square of the same area as a given circle through a series of compass and straight edge steps. It’s become something of a running joke and internet meme, and of course defining Pi exactly remains as elusive as ever.

Today and today alone though, you can in one sense claim that Pi is 3, because it’s twelve years since the launch of the original Raspberry Pi. The 29th of February 2012 was a leap day, and today being the third leap day since, could be claimed by a date pedant to be the third birthday of the little board from Cambridge. It’s all a bit of fun, but the Pi folks have marked the occasion by featuring an LED birthday cake.

Three leap days ago, your scribe was up at the crack of dawn to be one of the first to snag a board, only to witness the websites of the two distributors at the time, RS and Farnell, immediately go down under the denial of service formed by many thousands of other would-be Pi owners with the same idea. It would be lunchtime before the sites recovered enough to slowly buy a Pi, and it would be May before the computer arrived.

The Pi definitely arrived with a bang, but at tweleve years old is it still smoking? We think so, while it’s normalized the idea of an affordable little board to run Linux to the extent that it’s one of a crowd, the Pi folks have managed to stay relevant and remain the trend setter for their sector rather than Arduino-style becoming an unwilling collective term.

We’ve said this before here at Hackaday, that while the Pi boards are good, it’s not them alone which sets them apart from the clones but their support and software. Perhaps their greatest achievement is that a version of the latest Raspberry Pi OS can still run on that board ordered in February 2012, something unheard of elsewhere in single board computers. If you still have an original Pi don’t forget this, while it’s not the quickest any more there are still plenty of tasks at which they can excel. Meanwhile with their move into branded silicon and their PCIe architecture move we think things are looking exciting, and we look forward to another 12 years and three birthdays for them. Happy 3rd birthday, Raspberry Pi!

DietPi Version 9.1: Now With Raspberry Pi 5 Support And More

DietPi recently released version 9.1, which among other changes includes new images for the Raspberry Pi 5, Radxa Rock 4 SE and NanoPi R5S/R5C & 6. The Radxa Rock 4 SE image was necessary because the Rock 4’s RK3399 SoC is subtly different from the RK3399-T’s SoC in terms of memory support, which prevents a Rock 4 image from booting on the Rock 4 SE. Meanwhile the Raspberry Pi 5 image is all new and still a bit rough around the edges, with features like the changing of the resolution and camera module support not working yet. These new images are all available for testing.

We covered DietPi previously with their 8.12 release, along with the reasons why you might want to use DietPi over Armbian and Raspberry Pi OS. Essentially DietPi’s main focus is on performance combined with a small installed size, with the included configuration tools and the setup allowing for many more features to be tweaked than you usually find. If the performance improvements, lower RAM usage and faster boot times seen with the Raspberry Pi 4 holds up, then DietPi can just give the Raspberry Pi 5 a nice little boost, while saving power in the process.

Thanks to [StephanStS] for the tip.

A Straightforward AI Voice Assistant, On A Pi

With AI being all the rage at the moment it’s been somewhat annoying that using a large language model (LLM) without significant amounts of computing power meant surrendering to an online service run by a large company. But as happens with every technological innovation the state of the art has moved on, now to such an extent that a computer as small as a Raspberry Pi can join the fun. [Nick Bild] has one running on a Pi 4, and he’s gone further than just a chatbot by making into a voice assistant.

The brains of the operation is a Tinyllama LLM, packaged as a llamafile, which is to say an executable that provides about as easy a one-step access to a local LLM as it’s currently possible to get. The whisper voice recognition sytem provides a text transcript of the input prompt, while the eSpeak speech synthesizer creates a voice output for the result. There’s a brief demo video we’ve placed below the break, which shows it working, albeit slowly.

Perhaps the most important part of this project is that it’s easy to install and he’s provided full instructions in a GitHub repository. We know that the quality and speed of these models on commodity single board computers will only increase with time, so we’d rate this as an important step towards really good and cheap local LLMs. It may however be a while before it can help you make breakfast.

Continue reading “A Straightforward AI Voice Assistant, On A Pi”

All-Sky Camera Checks For Aurora

The aurora borealis (and its southern equivalent, the aurora australis) is a fleeting and somewhat rare phenomenon that produces vivid curtains of color in the sky at extreme latitudes. It’s a common tourist activity to travel to areas where the aurora is more prevalent in order to catch a glimpse of it. The best opportunities are in the winter though, and since most people don’t want to spend hours outside on a cold night night in high latitudes, an all-sky camera like this one from [Frank] can help notify its users when an aurora is happening.

Because of the extreme temperatures involved, this is a little more involved than simply pointing a camera at the sky and hoping for the best. The enclosure and all electronics need to be able to withstand -50°C and operate at at least -30. For the enclosure, [Frank] is going with PVC tubing with a clear dome glued into a top fits to the end of the pipe, providing a water-resistant enclosure. A Raspberry Pi with a wide-angle lens camera sits on a 3D printed carriage so it can easily slide inside. The electronics use power-over-ethernet (PoE) rather than a battery due to the temperature extremes, which conveniently provides networking capabilities for viewing the images.

This is only part one of this build — in part two [Frank] is planning to build a system which can use this camera assembly to detect the aurora automatically and send out notifications when it sees it. Watching the night sky from the comfort of a warm house or sauna isn’t the only reason for putting an all-sky camera to use, either. They can also be used to observe meteors as they fall and then triangulate the position of the meteorites on the ground.

Memory Box Shows Photos Based On Fingerprint

With his young son’s birthday coming up in a few weeks, [Mike Buss] wanted to build him something fun that the boy could hold on to all his life. After doing some sketching, [Mike] arrived at the idea to make a memory box uses a fingerprint scanner to show different pictures based on the fingerprint.

[Mike] started by rendering the box in Blender and then cutting a sizable hole in the lid for the E-ink screen. That’s around the time the first problem came up — there were weird vertical lines in the display. Sure enough, that screen was broken. Then he added the SD card reader, but the SD card wouldn’t work, and was heating up besides. Finally, the fingerprint scanner was causing issues, but it turned out that the power supply was at fault.

After all of that, [Mike] switched from an ESP32 to a Raspi Zero W to simplify the whole process of finding a photo tagged with the person’s fingerprint. [Mike] added a Python script that listens for new memories over Wi-Fi. A memory in this case consists of a picture, a description, a list of people tagged in the picture, and some additional metadata.

One important lesson [Mike] learned was that of balancing planning vs. just taking action. If he had taken the time to consider the complexity of the tagged-photo retrieval system, he would have arrived at an SBC solution much sooner. Be sure to check out the build video after the break.

You can have all sorts of fun with fingerprint scanners, like this one that opens a secret bookcase door.

Continue reading “Memory Box Shows Photos Based On Fingerprint”