Welcome to the CircuitPython Show. I'm your host, Paul Cutler. This episode I welcome Aaron Pendley,
also known as Squid.jpg in the Adafruit community. Aaron started his career as a game programmer,
programming games for the Game Boy Advance, Nintendo DS, PlayStation 3, and Xbox 360 before
transitioning to iOS development. Aaron, welcome to the show. Thanks, Paul. It's an honor to be here.
I'm glad you could make it. How did you first get started with computers?
I've always been interested in computers since I was a kid, but my first real experience was
in the fourth grade. I had this fantastic teacher who once a week would take us to the computer lab
where we had a bunch of Apple IIe computers, and he taught us how to program in BASIC.
And for the most part, that's all I did for most of my teenage years. My grandma got me this KPro2
computer at a garage sale for like $25 and it was basically like this this metal briefcase computer
with a couple of floppy drives and like one of those green phosphor screens and it was already
like old at the time you know but on one of the floppy disks was the basic programming language so
I was still able to just take that and keep hacking on it you know all throughout kind of
my teenage years and that was really like my main introduction to computers and programming.
And I understand that you actually won a contest back in 1999 for Game Boy programming.
Yeah, that's right. So at the time that the Game Boy Color came out, I was working as a bellman/shuttle
driver at a Holiday Inn. Pretty great job for kind of just like a slacker, you know, a teenager who
just graduated. But I got this Game Boy Color and I was just like floored by it. It was amazing. And
And so I dug around a little bit and I found some kind of gray market Korean hardware. Basically, they sold like cartridges that you could put your own software on using a flash chip and then a little programmer devices to go along with it.
So using that I was able to, you know, write code and actually see it run on the hardware itself, which was really exciting.
And the main way that I was able to do it was I learned C because there was a tool set available called GBDK, Game Boy Developers Kit. Incidentally, that developer kit is still around now and is still maintained. And it's the basis for the popular GB Studio, which if you know, John Park on his show lately did a series on how to make games with it. So that's pretty cool. It's cool to get to kind of use those tools then and they're still around now and still kind of, you know,
being actively developed and flourishing. So yeah, with that I then tried, I don't really have a lot
of artistic capability, so I then tried to recruit basically everyone I knew to help me make a video
game. Most people's responses were pretty tepid, you know, like, "Oh yeah, that would be cool," but
they didn't really want to work very hard at it. So I had one friend I knew, he was a really great
artist and he was studying animation at the time, so I went to him and was like, you know, "Hey,
"Do you want to make a video game?" and he was just like, "Yeah, of course." Like, you know, it was a silly question.
So yeah, around that same time, we had just kind of been goofing around with stuff and this competition was announced called Y2 Code.
It was right at the end of 1999.
And I think we had maybe like three or four months to get something together.
So, you know, in between our day jobs and whatever we were doing,
we basically spent all of our waking hours just like working on this game.
The idea was kind of like a platforming game and you had a sword and you ran around and killed a bunch of bad guys or whatever.
It was our first game that we ever made so it wasn't particularly well designed gameplay wise and we weren't able to get sound effects into it.
But the art style was really cool and we had a couple of really cool technically impressive tricks that we did in the game.
And that ended up getting a second place in the competition which was basically the start of my career.
I was then able to use that to get a job working on Game Boy Advance games a little while later.
Incidentally, with that same friend, we both got a job at the same studio.
And yeah, that was the start of my career, really.
That's pretty cool.
Thanks.
Adafruit community members might know you by your nickname, Squid.jpg.
How did you pick that out?
So I have been a fan of this video game, this Nintendo video game named Splatoon, probably
since 2017.
And originally that was my name that I used whenever I played Splatoon.
And after a while I joined Twitch with the hopes of finding other people to play Splatoon
with and eventually ended up streaming a little bit as well.
So that's kind of like the name I became known by and it's the name of my Discord.
And so it just kind of stuck even now.
What's kind of funny is that a game that I made on iPhone is my avatar for a lot of things
as well.
I made this game called Cow Trouble after I was kind of done with the industry at large.
And if you go to the Adafruit Playground page right now, you'll still see the little icon
of the farmer guy who's the main character in our game.
How did you discover CircuitPython?
Probably it was around 2020, early pandemic days.
I was bored out of my mind.
And I wanted to do something that reminded me of some work that I had done at a job previously
where I worked with vending machines.
And basically at that job, I wrote iPad apps that would interface with vending machines
in various ways that our customers who were vending machine companies, like their technicians
would use them and their drivers and stuff like that.
But that was my first experience using an Arduino.
We would sometimes use them to simulate the vending machine so that I could write my software
when I didn't have access to like an actual vending machine.
And so yeah, so when the pandemic came around, I was very bored and I had a lot of fun doing
that.
"Oh, I'll buy the Arduino student kit,
and I'll learn a little bit more about this Arduino stuff."
And so I did all the basic things everyone does,
like LEDs and potentiometers and seven segment displays
and all that stuff.
And eventually, it just got to the point
where the programs I was writing
were too big to fit on an Arduino.
And at that time, I had already bought
some basic components from Adafruit,
so I had some kind of awareness of who they were.
And plus, it's virtually impossible
to work in the Arduino ecosystem without coming across Adafruit libraries. So I looked around on their page a little bit and they just started selling this really cool microcontroller called a CutiePie using the SanD21 chip. And they were $6 at the time, which, you know, the cost of an Arduino is multiple times that. So when I came across those, I was like, well, I'm gonna buy a bunch of those. I didn't know how to solder though, was kind of a problem. So I also bought a pack of 25 breadboard NeoPixels, and a soldering iron, and a
and just kept soldering until all that was done, and I knew how to solder. So from there, yeah,
I just did a lot of various NeoPixel projects. So where CircuitPython comes into it is one day,
I wanted to build a kind of a macro pad using arcade buttons. And the idea was, now that I'm
using several different development environments to program in, there's Xcode that I use for my job,
and then Arduino at the time for doing Arduino development and other ones, I wanted a set of
the buttons I could press that would be the same, you know, to like build my code or clean it no
matter what environment I was in. So CircuitPython has the killer feature of just being able to plug
into a computer, edit code, and the changes are instant. And that seemed perfect for that kind of
a project. And it was. If I remember correctly, I also soldered one of the little flash chips onto
the CutiePie at the time to make a CutiePie Express so that I had enough resources to do all
of that. Yeah, that was my first real circuit Python project. Let's chat about some of the
projects you've shared on your Adafruit LearnGuide Playground page. I think my favorite project of
yours is the Top Secret Lunchbox. How did this project come about? So I'm a big video game player
since I was a kid, obviously, and one of my favorite kinds of games are these survival
horror games. And kind of a key feature of these games is they typically involve kind of like
ham-fisted lock and key puzzles or brain teasers that you need to solve in order to progress
throughout the game. A classic example would be Resident Evil or something like that.
Kind of aside from that, I also in the last maybe 10 to 15 years, escape rooms have branched off of
that same idea where you're in the game and you have to solve these puzzles to get out of the
earlier this year called Lorelei and the Laser Eyes,
which is kind of like those ideals distilled into,
you know, what to me was like the perfect game of that type.
You know, you're in a mansion
and you have to solve all these puzzles
and there's this like really cool kind of ghost story.
And so what I wanted to do,
like coming off of playing that game,
I was really inspired to try and make my own escape room
puzzle.
And so I'll confess it wasn't my first attempt.
It was actually my third attempt at doing something like
My first two attempts, they were neat, but they were really, really too ambitious. Hardware-wise, software-wise, just conceptually, you know, the ideas were too broad.
And so, kind of after playing Lorelei, it kind of clicked with me that actually what I needed to do was distill, like, my idea for this down to a single interaction.
You know, like a core interaction that I could build puzzles off of and make, like, a game.
I also had around that time watched an episode of John Park's workshop where he was doing this cool connect the wires type puzzle where you know you had to like connect the wires in a certain way to you know light the lights up and solve it.
And so I kind of took those two ideas and meshed them together and I made that kind of switchboard idea the core mechanic for this for this lunchbox game.
And yeah, from there I was able to start prototyping things. The idea that I had was that I didn't want to like, I didn't exactly know what I was going to do at the beginning of it. I had some rough ideas. And since I had attempted this a couple of times before, I could reuse some of my ideas from that.
But going into it, I needed to still prototype to make sure my game idea would work and things like that.
So I used these cool swirly board PCB things that Adafruit sells that lets you easily attach all kinds of various microcontrollers and breakout boards.
So I was able to bring up this project before even considering the design and the case and everything, just the functionality.
With just that and adding the functionality that I wanted and writing the program and the bring up code.
And then from there, once I knew everything that I was going to use, I could build my panel and my enclosure that I could stick into the launch box.
And since that was my third time doing this, this process at this point was a lot smoother.
And so from starting to do the design work to actually having the full project built probably took about a week.
The hard part, honestly, was writing the software for it because games are just kind of hard to write.
So it took me about another three weeks to write the software for it.
So for listeners at home, can you describe when you open the lunchbox, what's inside
of the lunchbox?
So when you open the lunchbox, one thing you'll notice is how you turn it on.
There's a little slot for a key.
And so you need a key to turn it on.
And then once it's on, various lights and sounds and things happen.
And so there's 10 headphone jacks, basically.
And each one has its own LED.
It's an RGB NeoPixel LED on the side of it.
And so basically that's the core of the game.
There's also a little compartment where I can hold all the little cables so that they
can travel around with it.
And I keep the key in there, but one thing that can be fun to do with this is to hide
the key and present a clue to a player, so that just adds an external element to it.
And then there's also an arcade button with a NeoPixel inside of it that I can use just
for various interactions.
Okay, cool.
Tell me about the Zapper Light sound mod project where you reused an NES Zapper from Duck Hunt.
Nintendo made this cool game, Duck Hunt, back in the 80s, and to go along with it they had
this cool Zapper gun, this light gun.
Fast forward to today, and these guns can still be found pretty cheaply.
You can get them at game shops, on eBay, ranging from anywhere from $10 to $20.
But unless you're a hardcore retro game enthusiast, they're probably not very useful to you because
you need an old-school CRT TV to use them. So my thought was I wanted to take one of these and just
kind of like take all the the parts out that didn't really that I didn't need and instead
replace them with parts that would allow me to make sound effects and light effects or whatever.
And so yeah a couple of years ago I took on this project and I um it was a very complicated
project. It had several boards there was like an itsy bitsy microcontroller and a battery charging
board and an i2s audio board and I had to take flush cutters to the inside of the shell and cut
out all kinds of bits so that I could fit all of this in there and it was kind of a complicated
build and for whatever reason a couple of months ago I decided I would go on Adafruit Show & Tell
and finally show it off and so yeah I was showing it off and Liz Clark asked me if I was going to
write about it and I was like well you know I hadn't really planned on it but yeah let's go
and opened it up and it was a nightmare. (laughs)
You know, as much of a nightmare as it was to build,
it was even more of a nightmare to write about,
and to try to like relate to somebody,
how you might actually replicate this.
So, you know, instead I decided to maybe take
this opportunity to try and redesign my mod,
to make it more approachable,
and to take advantage of some things
that I didn't have a couple years ago.
And one of those was a 3D printer.
Since then I've got a 3D printer,
and I've learned how to do some basic CAD stuff.
And another thing that happens, Adafruit released probably like my favorite microcontroller. It's the RP2040 PropMaker Feather. This board already had everything that I needed, all those other boards to do.
So my idea was that I wanted to make a mod that was easy to do and was not destructive to the shell. So, you know, for whatever reason you regretted it and wanted to go back to having, you know, the original zapper, you could do that.
And what I did was there's a little piece of geometry on the bottom of the grip where normally the cable strain relief is for the cable that plugs into the NES.
If you take that out, you can 3D print a piece of geometry to put just slot right back in there and it makes like a great base or like fixture for anything you want to put there really.
So I kind of extended that into a box-like enclosure.
And from there, I was able to put a switch and a battery
and the prop maker feather into,
and wire all the rest of it into my speaker and my NeoPixel,
and the trigger mechanism of the Zapier.
And from there, that was much easier to write about.
And yeah, I was able to write that guide and put it out.
And it's probably been one of the most fun projects
I've ever worked on.
So I'm really glad Liz kind of gently prodded me
revisit it and do that. So when you press the trigger what happens? So the trigger
has a really neat actuator mechanism where when you pull the trigger all the
way back it has like an auto release. So that's like the classic kind of you know
click mechanism that everyone associates with these weapons. So what it actually
is it's just a simple you know just a simple button really except for that
mechanical thing. So when you barely pull the trigger a little bit that's when it
actually makes the connection and closes the circuit and then if you pull it back the rest of
the way it clicks back and opens the circuit again. So the way I actually programmed it is
when it first detects that closed circuit is when it plays the sound effects and shows the lights
because typically you're you're mashing it all the way but those mechanisms are pretty old by now and
they don't always work so I wanted to also you know I did it rather rather than making it when
the circuit opens again to play the sound effects I did it when it opens so that you could pull the
it would catch it if you were having issues with that. I'll make sure that I
link to all of these projects on the Adafruit Learn Guide system too. Great, thanks. I like
on this next project that you confess that you don't love to play video games
with a keyboard. What did you build to help with that? I was playing XCOM and
using the keys to control the camera, and that uses the WASD keys like most PC
games do that use keyboard, but I've never really been a fan of that because
it hurts my hand really. It causes a lot of cramps and some of the configurations you have to put your hand into to hit some of the other keys too can be really uncomfortable. So as I was playing XCOM 2, it dawned on me that I could probably take a Wii Nunchuk and plug it into this cool little adapter that Adafruit makes, pair it with a simple microcontroller, and just reprogram it to remap it to those keys. And it worked out really well. I just slammed out a little bit of the controller, and it worked out really well. I just slammed out a little bit of the controller, and it worked out really well. I just
little 3d printed case for it and put it all together and wrote the code and it
worked so well that I figured I would write about it as well. I know this next project is
done in Arduino but you mentioned it could be possible to do it in CircuitPython 2.
What is the Wi-Fi matrix keypad remote? So the only reason that I
actually did this project in Arduino is definitely possible to do this in
CircuitPython but the main thing is that CircuitPython typically when you boot it
up can have like a two to three second boot time. And so what I wanted to build was like, I have
maybe a couple dozen or more various lighting devices around my house that I built with
microcontrollers, a lot of them using WLED as well. And I have an MQTT network, like a local network
that I've got all these plugged into, but no real great way to control them. I could bust out my
phone and use WLED as interface or some other things. But you know, what I really wanted was
just something I could pick up, press a button, and turn on a light or turn on
all the lights in my office or change the theme of the lighting or whatever. So
yeah, the main reason that I went with Arduino is just because it boots up much
more quickly and given that I also had to like connect to a Wi-Fi network and
then connect to the MQTT broker, I wanted you know to try to shorten that wake up
time as much as I could. And so as it stands right now it only maybe takes two
seconds tops for my devices from the time I pick them up to when you know
they're ready to receive input. So I think that worked out pretty well and really just with CircuitPython it would have doubled that time. So that's kind of what I was trying to minimize. Sure. But yeah, this remote, you know, I'm not a big fan of touch screens and I'm not a really big fan of using my phone to control everything because you typically got to pull your phone out, find the app that you got to use it, wait for it to initialize. And then, you know, at some point between five and 10 seconds, you might be at a point where you're ready to like press a button to make something happen. And so yeah, I just I really
just wanted like you know a remote like a TV remote that you could pick up and press a button and it
would just work. And that was pretty much with this all but one thing that I don't possess yet
is the skills to design a PCB. What I kind of had to do was find a good alternative for buttons you
know what I mean it's not easy to find great like buttons that feel really good that are you know
low profile that are easy to include into a project unless you're going to design your own PCB and
and find your own buttons to put on there and stuff. So this keypad remote, the classic like 12 key keypad remote that you see in movies or you know anywhere you go, turned out to be kind of the perfect solution for this. And yeah, I just connected it to an ESP 32 QDPi, put a 500 milliamp battery on it, and a little bit of custom code. And I was able to make a few of these now. And I keep one in each room, each one is customized, you know, to change the settings in each room.
I have a pair of the LED glasses from an Adafruit AdaBox. Tell me about the custom firmware you created for these. I love those glasses. I remember getting that getting that box too. And I just would devour every single demo that I could find, you know what I mean, trying to write my own. And so probably like the one thing about those glasses, those if you want to like take them out and show them off, you're kind of stuck on with one mode, you know what I mean? There's a lot of great examples out there. But there's nothing that kind of consolidates it into like one package.
where you can go and change the mode on the fly, you know what I mean, or change it to react to
whatever's going on in your situation. And so that was my main motivation for it, is it was around
Halloween and I wanted to take these glasses out and I wanted to just show them off and all the
stuff they could do. So I went and looked for all of my favorite examples and compiled them into
this firmware and added a couple of my own and added a couple of features that, you know, are
probably like over the top and ridiculous, but I think they really make it a lot more fun to use.
And one of those is integration with the Adafruit Connect app on phones and computers. So you can
connect to it with the app and you can change the modes, you can change the colors, and do all kinds
of customization with that. And then kind of like as a further, you know, ridiculous stretch goal,
I also integrated a Bluetooth nunchuck adapter with it so that you could use the nunchuck to
to kind of puppet the eyes and the glasses,
or do various things depending on the mode.
And so kind of one thing that I didn't like about this project,
kind of the downside a lot of times to using Arduino or something like Platform.io is,
it's not always easy to just put this in somebody's hands
who just wants to see something cool on their devices, right?
So, yeah, if I'm someone and I bought these glasses and I'm looking around,
I'm probably just going to want to take the things that I can drag and drop and put on there.
I don't want to like download Platform.io and figure out how a compiler works and all this stuff.
So this was a cool project too, because I figured out how to take that and bake it into a UF2 file, so that it works similar to like CircuitPython. You could just drag and drop a file onto your device and there it is.
And I was really glad that I did that because probably like the perfect demo of this firmware came a couple weeks later when Noah Ruiz on his 3D printing show was kind of showing off a prototype that he was doing.
And he basically just went through the whole firmware and showed off everything.
And yeah, it was just, uh, I was just smiling the whole time.
It was so cool to see that.
I bet.
I think my favorite effect is the Cylon from Battlestar Galactica, where you've
got the red LEDs going back and forth.
Yes.
I love that one too.
I think I've pretty much every, like every device that has LEDs on it, then I can.
I ended up putting that on there.
Last question I ask each guest, you're about to start a new project.
Which microcontroller do you reach for?
Definitely the PropMaker Feather. It's got most of the things that I typically want to do, which is audio support, NeoPixels, even servos if you want to use those. It's just kind of perfect for that kind of thing.
There is like a runner up though, when I need Wi-Fi or something like that, I will also reach for an ESP32 S3 typically.
They're great for CircuitPython, they're fast, they have tons of resources.
Aside from Wi-Fi, you can use ESP-NOW to communicate with other ESP32 devices.
They're just fantastic.
I agree, I think the S3 is typically my go-to pick when I need Wi-Fi as well.
Yeah.
Aaron, thanks so much for being on the show.
Thanks for having me, Paul. It's been great.
Thank you to Aaron for coming on the show.
To learn more, visit the show notes to see photos of Aaron's projects,
links to his Adafruit Playground pages, and his BlueSky profile. For show notes and transcripts, visit www.circuitpythonshow.com.
Until next time, stay positive.