Python Will Soon Support Switch Statements

Rejoice! Gone are the long chains of ifelse statements, because switch statements will soon be here — sort of. What the Python gods are actually giving us are match statements. match statements are awfully similar to switch statements, but have a few really cool and unique features, which I’ll attempt to illustrate below.

Continue reading “Python Will Soon Support Switch Statements”

Hackaday Podcast 112: We Have An NFT, Racing A Möbius Strip, And Syncing Video With OpenCV And Blender

Hackaday editors Elliot Williams and Mike Szczys celebrate the cleverest projects from the week that was. We tried to catch a few fools on Thursday with our Lightmode™ and NFT articles — make sure you go back and read those for a good chuckle if you haven’t already.

While those fall under not a hack, many other features this week are world-class hacks, such as the 555 timer built from 1.5-dozen vacuum tubes, and the mechanical word-clock that’s 64 magnetic actuators built around PCB coils by Hackaday’s own [Mortiz v. Sivers].

A treat for the ears, [Linus Akesson] aka [lft] shows off a Commodore64 that seriously sounds as big as a cathedral organ. And a masterpiece of OpenCV and Blender, you can’t miss the project by [Matthew Earl] that overlays video of the Mars landing on still satellite photos… perfection!

Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Direct download (~60 MB)

Places to follow Hackaday podcasts:

Continue reading “Hackaday Podcast 112: We Have An NFT, Racing A Möbius Strip, And Syncing Video With OpenCV And Blender”

Electric Window Motor Becomes Mini Chainsaw

This mini handheld chainsaw by [Make it Extreme] is based around an electric motor from a car door, the same ones used to raise and lower car windows. They are common salvage parts, and with the right modifications and a few spare chainsaw bits attached, it turns out that the motor is more than capable of enough zip to cut through a variety of wood. Add a cordless tool battery pack, and the portable mini handheld chainsaw is born.

What’s really remarkable about the build video (embedded below, after the break) is not simply that it shows the build process and somehow manages to make it all look easy. No, what’s truly remarkable is that in the video it is always clear what is happening, and all without a single word being spoken. There’s no narration, no watching someone talk, just a solid build and demonstration. The principle of “show, don’t tell” is definitely taken to heart, here.

So, how well does it work as a chainsaw? It seems to work quite well! [Make it Extreme] does feel that a chain with smaller teeth and a higher motor speed would probably be an improvement, but the unit as built certainly can cut. You can judge for yourself by watching the build video, embedded below.

Continue reading “Electric Window Motor Becomes Mini Chainsaw”

This Week In Security: Ubiquity Update, PHP Backdoor, And Netmask

Back in January, we covered the news that Ubiquiti had a breach of undisclosed severity. One reader pointed out the compromise of a handful of devices as potentially related. With no similar reports out there, I didn’t think too much of it at the time. Now, however, a whistleblower from Ubiquiti has given Krebs the juicy details.

The “third party cloud provider” the original disclosure referred to was Amazon Web Services (AWS). According to the whistleblower, just about everything was accessible, including the keys to log in to any Ubiquiti device on the internet, so long as it was cloud enabled. The attackers installed a couple of backdoors in Ubiquiti’s infrastructure, and sent a 50 bitcoin blackmail threat. To their credit, Ubiquiti ignored the blackmail and cleaned up the mess.

To the claim that there was no evidence attackers had accessed user accounts, it seems that the database in question simply has no logging enabled. There was no evidence, because nothing was watching. So far, I’ve only seen the one report of device compromise that was potentially a result of the attack. If you had a Ubiquiti device go rogue around December 2020 – January 2021, be sure to let us know. Continue reading “This Week In Security: Ubiquity Update, PHP Backdoor, And Netmask”

Ultrasonic Sonar Detects Hidden Objects

While early scientists and inventors famously underestimated the value of radar, through the lens of history we can see how useful it became. Even though radar uses electromagnetic waves to detect objects, the same principle has been used with other propagating waves, most often sound waves. While a well-known use of this is sonar, ultrasonic sensors can also be put to use to make a radar-like system.

This ultrasonic radar project is from [mircemk] who uses a small ultrasonic distance sensor attached to a rotating platform. A motor rotates it around a 180-degree field-of-view and an Arduino takes and records measurements during its trip. It interfaces with an application running on a computer which shows the data in real-time and maps out the location of all of the objects around the sensor. With some upgrades to the code, [mircemk] is also able to extrapolate objects hidden behind other objects as well.

While the ultrasonic sensor used in this project has a range of about a meter, there’s no reason that this principle couldn’t be used for other range-finding devices to extend its working distance. The project is similar to others we’ve seen occasionally before, but the upgrade to the software to allow it to “see” around solid objects is an equally solid upgrade.

Slimming The Raspberry Pi Pico With A Hacksaw

The Raspberry Pi Pico is the hot new star of the microcontroller scene, with its fancy IO hardware and serious name recognition. Based on the RP2040 “Raspberry Silicon” chip, it’s introducing fans of the single-board computer line to a lower level of embedded development. The Pico isn’t big, as its name suggests, but miniaturization is a never ending quest for improvement – so [That Dragon Guy] decided to see if the devboard could be smallified further at a minimum of cost.

While other smaller RP2040 boards are reaching the marketplace, they all cost a lot more than the $4 of the Pico. Thus, [That Dragon Guy] got creative. Having realised that the bottom section of the board was only full of passive traces and pads, he simply hacked it off with a scroll saw and sander. This gives a 30% reduction in footprint, at the cost of some mounting holes, GPIO pins and the debug interface.

In testing, the rest of the board continued to function perfectly well, so we’re calling this a win. It builds on amusing experiments [That Dragon Guy] had done before with the Raspberry Pi B+ which gave us a good chuckle. The Raspberry Pi has always been a minimalist darling, with the Pi Zero of 2015 being a bit of a gamechanger, and much beloved by this writer. Video after the break.

Continue reading “Slimming The Raspberry Pi Pico With A Hacksaw”

Over-Engineered Incandescent Numerical Display Shows Great Workmanship

Back before LED technology came into its own, displays used incandescent bulbs. These vintage incandescent displays weren’t necessarily big; the Eaton 925H-C fiber optic display, for example, has numbers barely 7 mm tall and packs two of them into a tiny area. Of course, the depth of the display module itself is huge by today’s standards; those components have got to go somewhere, after all.

This particular device is, in [Industrial Alchemy]’s words, “[d]ripping with the spending excess that only a bottomless military budget can provide… the Eaton 925H-C may not be a practical device, but it is certainly an impressive one.”

The way the display works is this: individual incandescent bulbs light up fiber optic light guides, which terminate on the face of the display in small dots to make up a numerical display. With only fourteen bulbs, the dots we see here clearly aren’t individually addressable; the two digits are most likely broken up into seven segments each, with three dots making up each segment.

No expense seems spared in the design and manufacture of these displays. Even the incandescent lamps have individual shock absorbers.

The sheer amount of workmanship in these displays is remarkable, and their design makes them easy to retrofit with LED technology instead of replacing the tiny incandescent lamps. In a stark contrast to all of the machined aluminum and gold plated contacts seen here in the Eaton 925H-C, take a look at this Soviet-era seven-segment incandescent display whose construction is far less sophisticated, but shows off its own clever engineering. We’ve also seen more modern DIY takes on the concept, using LED light sources and cured UV resin light pipes to get that vintage look to the displays.