Different Algorithms Sort Christmas Lights

Sorting algorithms are a common exercise for new programmers, and for good reason: they introduce many programming fundamentals at once, including loops and conditionals, arrays and lists, comparisons, algorithmic complexity, and the tradeoff between correctness and performance. As a fun Christmas project, [Scripsi] set out to implement twelve different sorting algorithms over twelve days, using Christmas lights as the sorting medium.

The lights in use here are strings of WS2812 addressable LED strips, with the program set up to assign random hue values to each of the lights in the string. From there, an RP2040-based platform will step through the array of lights and implement the day’s sorting algorithm of choice. When operating on an element in the array the saturation is turned all the way up, helping to show exactly what it’s doing at any specific time. When the sorting algorithm has finished, the microcontroller randomizes the lights and starts the process all over again.

For each of the twelve days of Christmas [Scripsi] has chosen one of twelve of their favorite sorting algorithms. While there are a few oddballs like Bogosort which is a guess-and-check algorithm that might never sort the lights correctly before the next Christmas (although if you want to try to speed this up you can always try an FPGA), there are also a few favorites and some more esoteric ones as well. It’s a great way to get some visualization of how sorting algorithms work, learn a bit about programming fundamentals, and get in the holiday spirit as well.

Building Beautiful LED Lanterns With Black LED Acrylic

[Geeksmithing] and [When Geeks Craft] recently came together for a glowing collaboration. They wanted to build ever more attractive lanterns for a local parade event. They recently discovered a fantastic material that can really improve the look of whatever project you might be building with LEDs.

The material is commonly referred to as “Black LED Acrylic” or similar. In this case, it was sourced from TAP Plastics, though you can source similar acrylic from other vendors, too. From first glance, it looks like any other piece of black acrylic plastic. However, shine an LED through it, and it will be beautifully diffused and smoothed out to wonderful visual effect. A simple test of a 3×3 array of LEDs behind a 3D-printed grid shows how good this can look. It almost entirely eliminates hot spots, and the result looks like a display built out of juicy glowing cubes. The duo used this material to produce giant pixel art lanterns for their local parade. We only get a glimpse at the final build, but it appears giant Pacman and Blinky totems are on the way.

If you’ve been struggling to find a good way to diffuse the light from LEDs, you might want to give this stuff a try. Alternatively, you might explore some other methods we’ve looked at before, and don’t discount ping pong balls, either.

Continue reading “Building Beautiful LED Lanterns With Black LED Acrylic”

Windmill Desk Lamp Is Beautifully Soothing

Typically, lamps provide a stationary source of light to illuminate a given area and help us see what we’re doing. However, they can also be a little more artistic and eye-catching, like this windmill lamp from [Huy Vector].

It’s somewhat of a charming desk toy, constructed out of copper wire soldered into the form of a traditional windmill. At its base, lives a simple motor speed controller, while up top, a brushed DC gearmotor is responsible for turning the blades. As you might imagine, it’s a little tricky to get power to flow to the LED filaments installed on those blades while they happen to be rotating. That’s where the build gets tricky, using the output shaft of the motor’s gear drive and a custom slip ring to pass power to the LEDs. That power comes courtesy of a pair of 16340 lithium-ion cells, which can be juiced up with the aid of a USB-C charger board.

It’s an elegant build, and rather charming to watch in motion to boot. We love a good lamp build here at Hackaday, particularly when they’re aesthetically beautiful.

Continue reading “Windmill Desk Lamp Is Beautifully Soothing”

Interactive Hopscotch Tiles Make The Game More Exciting

Hopscotch is a game usually played with painted lines or with the aid of a bit of chalk. However, if you desire fancier equipment, you might like the interactive hopscotch setup from [epatell].

The build uses yoga mats as the raw material to create each individual square of the hopscotch board. The squares all feature simple break-beam light sensors that detect when a foot lands in the given space. These sensors are monitored by a Raspberry Pi Pico in each square. In turn, the Pico lights up addressable NeoPixel LED strips in response to the current position of the player.

It’s a simple little project which makes a classic game just a little more fun. It’s also a great learning project if you’re trying to get to grips with things like microcontrollers and addressable LEDs in an educational context. We’d love to see the project taken a step further, perhaps with wirelessly-networked squares that can communicate and track the overall game state, or enable more advanced forms of play.

Meanwhile, if you’re working on updating traditional playground games with new technology, don’t hesitate to let us know!

Giant Neopixel Is Just Like The Regular Kind, Only Bigger

Neopixels and other forms of addressable LEDs have taken the maker world by storm. They make it trivial to add a ton of controllable, glowing LEDs to any project. [Arnov Sharma] has made a great tribute to the WS2812B LED by building the NeoPixel Giant Edition.

The build is simply a recreation of the standard 5mm x 5mm WS2812B, only scaled up to 150 mm x 150 mm. It uses a WS2811 chip inside to make it behave in the same way from a logical perspective, and this controller is hooked up to nine standard RGB LEDs switched with MOSFETs to ensure they can deliver the requisite light output. The components are all assembled on a white PCB in much the same layout as the tiny parts of a WS2812B, which is then installed inside a 3D-printed housing made in white PLA. Large metal terminals were added to the housing, just like a WS2812B, and the lens was then created using a large dose of clear epoxy.

The result is a fully functional, addressable LED that is approximately 30 times larger than the original. You can even daisy-chain them, just like the real thing. We’ve covered all kinds of projects using addressable LEDs over the years, from glowing cubes to fancy nature installations. If you’ve got your own glowable project that the world needs to see, make sure you notify the tips line!

LED Hourglass Is A Great Learning Project

An hourglass tells you what it is in the name — a glass that you use to measure an hour of time passing by. [EDISON SCIENCE CORNER] has built a digital project that mimics such a thing, with little beads of light emulating falling sand in the timekeepers of old.

The build is designed around the Arduino platform, and can be constructed with an Arduino Uno, Nano, or Pro Mini if so desired. The microcontroller board is hooked up with an ADXL335 three-axis accelerometer, which is used for tracking the orientation and movement of the digital hourglass. These movements are used to influence the movement of emulated grains of sand, displayed on a pair of 8×8 LED matrixes driven by a MAX7219 driver IC. Power is courtesy of a 3.7 V lithium-ion cell, with a charge/boost module included for good measure. Everything is wrapped up in a vaguely hourglass-shaped 3D printed enclosure.

The operation is simple. When the hourglass is turned, the simulated grains of sand move as if responding to gravity. The movement is a little janky — no surprise given the limited resolution of the 8×8 displays. You also probably wouldn’t use such a device as a timer when more elegant solutions exist. However, that’s not to say builds like this don’t have a purpose. They’re actually a great way to get to grips with a microcontroller platform, as well as to learn about interfacing external hardware and working with LED matrixes. You can pick up a great deal of basic skills building something like this.

Would you believe this isn’t the first digital hourglass we’ve featured on the site?

Continue reading “LED Hourglass Is A Great Learning Project”

DIY Light Panels Work With Home Assistant

There are a few major companies out there building colorful LED panels you can stick on your wall for aesthetic purposes. Most commercial options are pretty expensive, and come with certain limitations in how they can be controlled. [Smart Solutions For Home] has whipped up a flexible DIY design for decorating your walls with light that is altogether more customizable.

In this case, the DIY light panels ape the hexagonal design made popular by brands like Nanoleaf. In this case, each hexagon panel runs an ESP32 microcontroller, which controls a series of WS2812 addressable LEDs. This allows each panel to glow whatever color you like, and they’re arranged in an XY grid to enable you to light individual panels with a range of different geometric effects. The benefit of having a full microcontroller on each panel is that they can act quite independently—each one able to be used as a smart light, an notification display, or even as a physical button, all integrated with Home Assistant.

If you’re a fan of DIY smart home products, these might be right up your alley. They’re supremely flexible and customizable, and can do a lot of things that commercial versions can’t easily replicate. Just don’t ignore the fact that they require a considerable amount of assembly, what with the custom PCBs, 3D printed enclosures, and front diffusers to deal with. That’s just the way the LED wall crumbles.

We’ve seen other similar builds before, too. Why? The simple fact is that a lot of people want cool glowy panels on their wall without having to pay through the nose for them.

Continue reading “DIY Light Panels Work With Home Assistant”