The Past, Present, And Future Of CircuitPython

Modern microcontrollers like the RP2040 and ESP32 are truly a marvels of engineering. For literal pocket change you can get a chip that’s got a multi-core processor running at hundreds of megahertz, plenty of RAM, and more often than not, some form of wireless connectivity. Their capabilities have been nothing short of revolutionary for the DIY crowd — on any given day, you can see projects on these pages which simply wouldn’t have been possible back when the 8-bit Arduino was all most folks had access to.

Limor Fried

Thanks to the increased performance of these MCUs, hackers and makers now even have a choice as to which programming language they want to use. While C is still the language of choice for processor-intensive tasks, for many applications, Python is now a viable option on a wide range of hardware.

This provides a far less intimidating experience for newcomers, not just because the language is more forgiving, but because it does away with the traditional compile-flash-pray workflow. Of course, that doesn’t mean the more experienced MCU wranglers aren’t invited to the party; they might just have to broaden their horizons a bit.

To learn more about this interesting paradigm shift, we invited the fine folks at Adafruit to the Hack Chat so the community could get a chance to ask questions about CircuitPython, their in-house Python variant which today runs on more than 400 devices.

Continue reading “The Past, Present, And Future Of CircuitPython”

The Right Benchmark For GPT

Dan Maloney wanted to design a part for 3D printing. OpenSCAD is a coding language for generating 3D objects. ChatGPT can write code. What could possibly go wrong? You should go read his article because it’s enlightening and hilarious, but the punchline is that it ran afoul of syntax errors, but also gave him enough of a foothold that he could teach himself enough OpenSCAD to get the project done anyway. As with many people who have asked the AI to create some code, Dan finds that it’s not as good as asking someone who knows what they’re doing, but that it’s also better than nothing.

And this is where I start grumbling. When you type your desires into the word-follower machine, your alternative isn’t nothing. Your alternative is to fire up a search engine instead and type “openscad tutorial”. That, for nearly any human endeavor, will get you a few good guides, written by humans who are probably expert in the subject in question, and which are aimed at teaching you the thing that you want to learn. It doesn’t get better than that. You’ll be up and running with your design in no time.

Indeed, if you think about the relevant source material that the LLM was trained on, it’s exactly these tutorials. It can’t possibly do better than the best of them, although the resulting average tutorial might be better than the worst you’ll find. (Some have speculated on what happens when the entire Internet is filled with these generated texts – what will future AIs learn from?)

In Dan’s case, though, he didn’t necessarily want to learn OpenSCAD – he just wanted the latch designed. But in the end, he had to learn enough OpenSCAD to get the AI code compiling without error. He spent an hour learning OpenSCAD and now he’s good to go on his next project too.

So the next time you hear someone say that they got an answer back from a large language model that wasn’t perfect, but it was “better than nothing”, think critically if “nothing” is really the right benchmark.

Do you really want to learn nothing? Do you really have no resources to get started with? I would claim that we have the most amazing set of tutorial resources the world has ever known at our fingertips. Compared to the ability to teach millions of humans to achieve their own goals, that makes the LLM party tricks look kinda weak, in my opinion.

This Week In Security: Zenbleed, Web Integrity, And More!

Up first is Zenbleed, a particularly worrying speculative execution bug, that unfortunately happens to be really simple to exploit. It leaks data from function like strlen, memcpy, and strcmp. It’s vulnerable from within virtual machines, and potentially from within the browser. The scope is fairly limited, though, as Zenbleed only affects Zen 2 CPUs: that’s the AMD Epyc 7002 series, the Ryzen 3000 series, and some of the Ryzen 4000, 5000, and 7020 series of CPUs, specifically those with the built-in Radeon graphics.

And at the heart of problem is a pointer use-after-free — that happens inside the CPU itself. We normally think of CPU registers as fixed locations on the silicon. But in the case of XMM and YMM registers, there’s actually a shared store of register space, and the individual registers are mapped into that space using a method very reminiscent of pointers.

Continue reading “This Week In Security: Zenbleed, Web Integrity, And More!”

CircuitPython Happenings Hack Chat With Adafruit

Join us on Wednesday, July 26 at noon Pacific for the CircuitPython Happenings Hack Chat with The folks from Adafruit!

join-hack-chatIt’s always a party when the good folks from Adafruit stop by the Hack Chat, and we expect no less than that this time around. It’s hard to predict where the conversation will go when [LadyAda], [pt], and [Scott] roll in, but we strongly suspect it’ll center on what’s new in the world of CircuitPython.

We’ve heard that they’ve got some cool stuff going on with CircuitPython on the RP2040, which just might lead to a Python-based fix for the current Bus Pirate supply chain problem. It’ll be a swashbucklingly good time, so make sure you stop by.

Our Hack Chats are live community events in the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, July 26 at 12:00 PM Pacific time. If time zones have you tied up, we have ahandy time zone converter.

Smart Assistants Need To Get Smarter

Science fiction has regularly portrayed smart computer assistants in a fanciful way. HAL from 2001: A Space Odyssey and J.A.R.V.I.S. from the contemporary Iron Man films are both great examples. They’re erudite, wise, and capable of doing just about any reasonable task that is asked of them, short of opening the pod bay doors.

Cut back to reality, and you’ll only be disappointed at how useless most voice assistants are. It’s been twelve long years since Siri burst onto the scene, with Alexa and Google Assistant following years later. Despite years on the market, their capabilities remain limited and uninspiring. It’s time for voice assistants to level up.

Continue reading “Smart Assistants Need To Get Smarter”

Recreating The Golden Era Of Cable TV

Fewer and fewer people have cable TV subscriptions these days, due to a combination of poor business practices by cable companies and the availability of alternatives to cable such as various streaming platforms. But before the rise of the Internet that enabled these alternatives, there was a short period of time where there were higher-quality channels, not too many commercials, a possibly rose-tinted sense of wonder, and where MTV actually played music. [Irish Craic Party] created this vintage cable TV network to capture this era of television history.

The hardware for this build is a Raspberry Pi driving an LCD display recovered from an old iPad. There’s a custom TV tuner which handles changing the channels and interfaces with an Apple Remote. Audio is sent through old computer speakers, and the case is built from 3D printed parts and some leftover walnut plywood to give it an era-appropriate 80s or early 90s feel. We’ve seen other builds like this before, but where this one really sets itself apart is in the software that handles the (television) programming.

[Irish Craic Party] has gone to great lengths here to recreate the feel of cable TV from decades ago. It has recreations of real channels like HBO, Nickelodeon, and FX including station-appropriate bumpers and commercials. It’s also synchronized to the clock so shows start on the half- or quarter-hour. Cartoons play on Saturday morning, and Nickelodeon switches to Nick-at-Nite in the evenings. There are even channels that switch to playing Christmas movies at the appropriate times, complete with Christmas-themed commercials.

The build even hosts a preview channel, one of the more challenging parts of the build. It continually scrolls through the channels and shows what’s currently playing and what will be showing shortly, complete with a commercial block at the top. For those who were around in the 90s it’s almost a perfect recreation of the experience of watching TV back then. It can even switch to a video game input when tuned to channel 3. There’s almost too much to go into in a short write-up so be sure to check the video after the break.

Thanks to [PCrozier] for the tip!

Continue reading “Recreating The Golden Era Of Cable TV”

Retrotechtacular: Better Living Through A-Bombs

Usually, if you are listening to people debate about nuclear issues, it is one of two topics: how to deal with nuclear weapon stockpiles or if we want nuclear power plants in our backyard. But there was a time when the US and the USSR had more peaceful plans for nuclear bombs. While peaceful plans for nuclear bombs might sound like an oxymoron, there was somewhat of a craze for all things nuclear at some point, and it wasn’t clear that nuclear power and explosives wouldn’t take over many industries as the transistor did, or the vacuum tube before it.

You may have heard about Project (or Operation) Plowshare, the US effort to find a peaceful use for all those atom bombs. The Atomic Energy Commission video below touts the benefits “for all nations.” What benefits? Mostly moving earth, including widening the Panama Canal or creating a new canal, cutting highways through mountains, assisting mining and natural gas production, and creating an artificial harbor. There was also talk of using atomic blasts to create new materials and, of course, furthering the study of the atom.

Continue reading “Retrotechtacular: Better Living Through A-Bombs”