If you’ve used Arduino technology, chances are that you’ve come across libraries written by Adafruit’s Limor ‘Ladyada’ Fried for the many devices and sensors that the company has to offer.
Writing these libraries is specialized work. You have to take the datasheets crammed with binary tables and specs for all the various control chips, and turn that information into code that will work as drivers.
Also: The best Raspberry Pi alternatives available right now
As I said, it’s very specialized work. And it’s also the sort of stuff that most users don’t see, and probably take for granted.
But could you do what everyone else is doing, and get ChatGPT to do the hard work on libraries?
Turns out the answer is yes, but there’s a catch.
In a blog post, Adafruit details how Fried created a multi-step workflow, which involved asking ChatGPT to create “an arduino library in the same style as ladyada / limor fried / adafruit” for a specific chip.
After giving ChatGPT access to the datasheet for the chip, Fried then guided ChatGPT through the steps for building the required drivers.
Also: How to use ChatGPT to make charts and tables
It’s pretty smart, and certainly saves a lot of typing.
However, as emphasized in the blog post, the time it takes ChatGPT to write a driver is “about the same as it would take Ladyada”. In fact, a chatlog example provided in the post shows just how much handholding ChatGPT needs to keep it on track.
While ChatGPT certainly seems to take some of the manual work out of the process, it’s clear that without Fried’s expert eyes carefully overseeing the proceedings, the AI bot would make a mess of things.
This result is to be expected, because — despite the hype — ChatGPT is a large language model-based chatbot. Very often, it’s not as clever as it confidently thinks it is.
And that issue is at the core of much of the misunderstanding surrounding ChatGPT. If you’re smart, ChatGPT can help you streamline mundane tasks, but in the wrong hands, it’s a tool that helps you get to the wrong answer faster and — dangerously — with more confidence.
Also: How to use ChatGPT to write code
So yes, you can use ChatGPT to write Arduino drivers, but the catch is that this approach is only going to be possible if you are already extremely good at writing them yourself.
If you want a deeper dive, there’s an interesting video (below) that goes into much more detail. If you’re geeky and into this sort of stuff, watching Fried go through the process is quite a learning experience.
My take is that I expect this process to get better and more streamlined over the coming weeks and months. But let’s take nothing for granted.