Speaker:
00:00:01
Welcome to the circuit Python show an independent podcast with the
Speaker:
00:00:04
people in and around circuit Python.
Speaker:
00:00:06
I'm your host, Paul Cutler.
Speaker:
00:00:07
This week, I'm joined by Todd Curt.
Speaker:
00:00:09
Todd is the co-founder of thing.
Speaker:
00:00:10
M a ubiquitous computing and internet of things.
Speaker:
00:00:13
Device studio based in Pasadena in San Francisco is the creator of the popular
Speaker:
00:00:17
blink USB notification light and blink on the smart led prototyping device.
Speaker:
00:00:22
Todd is a contributor to make magazine the author of the book hacking room.
Speaker:
00:00:26
And the active member in the Arduino community and co-founder of the Los
Speaker:
00:00:30
Angeles hackerspace crash space.
Speaker:
00:00:32
His password includes being the original systems architect of goto.com.
Speaker:
00:00:36
The first public pay per click search engine in a researcher
Speaker:
00:00:39
and Yahoo research lab.
Speaker:
00:00:41
Before that Todd was a hardware, software and firmware engineer
Speaker:
00:00:44
working on robotic camera systems for probes that went to Mars.
Speaker:
00:00:49
Nice to meet
Speaker:
00:00:49
you.
Speaker:
00:00:49
Great to have you.
Speaker:
00:00:50
So when I was reading your bio, it mentioned that you
Speaker:
00:00:52
found a thing, AMA ubiquitous computing and IOT device studio.
Speaker:
00:00:56
What exactly is
Speaker:
00:00:57
?The, well, it was back in 2006 and that was when the whole idea of
Speaker:
00:01:03
imagine a world where devices all around us are talking to each other
Speaker:
00:01:07
and maybe talking on the internet, you know, that was sort of a fantasy.
Speaker:
00:01:11
And so me and my co-founder, we were trying to make a.
Speaker:
00:01:15
Imagine a world where devices were smart, like everyday household
Speaker:
00:01:19
devices be they dressers or coffee tables or coffee makers.
Speaker:
00:01:24
And then trying to answer the question of like, well, what would
Speaker:
00:01:25
they have to say if they were smart?
Speaker:
00:01:27
It turned out that a little bit too soon, but we didn't have to
Speaker:
00:01:29
wait very long because you know, in 2007, the iPhone came out.
Speaker:
00:01:33
And suddenly everyone started to realize that, oh wait, maybe there's, there
Speaker:
00:01:38
can be this world where a computer is everywhere because now we all have to
Speaker:
00:01:41
started to have them in our pockets.
Speaker:
00:01:42
Right.
Speaker:
00:01:43
And we started to see these, these phones as computers
Speaker:
00:01:45
rather than just to telephones.
Speaker:
00:01:47
And so thing, I'm really struggled to get its concept off the ground,
Speaker:
00:01:50
partly because of technological reasons, partly because of just.
Speaker:
00:01:53
Societal reasons, you know, like it's hard to, it's hard to imagine
Speaker:
00:01:56
these worlds from our research of prototyping, various things.
Speaker:
00:01:59
One of the things that I came up with was the blink, um, the little like
Speaker:
00:02:03
ice squared, C Arduino ad-on that let you control an RGB led very easily,
Speaker:
00:02:07
which back in 2007, 2008 was like a really cool thing because it was hard
Speaker:
00:02:11
to control RGB LEDs with Arduinos, especially going to do more than one.
Speaker:
00:02:15
If you want to do like four or five, it was just like coming up on.
Speaker:
00:02:18
And then that led to the blink one, which is our current it's a USB led that,
Speaker:
00:02:22
uh, that is our current big product.
Speaker:
00:02:23
You know, that's a great
Speaker:
00:02:24
segue.
Speaker:
00:02:24
So you've been around Arduino then since back then, and it sounds like both your
Speaker:
00:02:28
work and your personal life kind of cross with the whole maker community.
Speaker:
00:02:34
What led you into Arduino?
Speaker:
00:02:36
Really?
Speaker:
00:02:36
It was my co-founder.
Speaker:
00:02:37
He, uh, went with thing I'm he knew a lot of the original or Arduino.
Speaker:
00:02:41
Co-founders sorry.
Speaker:
00:02:42
A lot of the original Arabic team.
Speaker:
00:02:44
And we do this yearly conference called sketching and hardware, which at the time
Speaker:
00:02:48
back in 2006, 2007 was trying to imagine what would be the perfect Lego like
Speaker:
00:02:55
system for sketching electronic product.
Speaker:
00:02:58
I can send what you can just sketch on a piece of paper and show it to someone
Speaker:
00:03:01
and they get the idea it's like, is there a similar thing that you can just
Speaker:
00:03:04
like quickly plug together stuff and show it to someone and go, oh, I get,
Speaker:
00:03:07
you're trying to do for this burgeoning world of internet of things and because
Speaker:
00:03:11
computing and we thought at the time with like, oh, Great thinkers together.
Speaker:
00:03:17
We can figure out the one true system that will work for everyone.
Speaker:
00:03:20
And Arduino had just been sort of invented at Ivrea out of the wiring project.
Speaker:
00:03:26
And so we, and so Mike, my co-founder got a bunch of those people in
Speaker:
00:03:29
and got a bunch of the people from academia and from, from industry.
Speaker:
00:03:32
And we all had this like, you know, four day long conference of like,
Speaker:
00:03:35
let's try to figure it out and you know, and we've kept doing that
Speaker:
00:03:38
conference ever since pretty much.
Speaker:
00:03:41
And it turned out, you know, very quickly that there is no.
Speaker:
00:03:44
Perfect Lego like solution for schedule electronic ideas are, do
Speaker:
00:03:47
we know is a really powerful one.
Speaker:
00:03:49
It abstracts away a lot of the, the stupid problems.
Speaker:
00:03:52
Like one of the best things our greener does is it gets you to Blinky.
Speaker:
00:03:56
Like how fast can you go from opening up the box and have little
Speaker:
00:03:59
board to blinking led on that board?
Speaker:
00:04:02
And.
Speaker:
00:04:03
You know, in the nineties, two thousands, you had to install the
Speaker:
00:04:07
well first you had to purchase the integrated development environment
Speaker:
00:04:11
from the vendor and they do install it.
Speaker:
00:04:12
And then you had to like, you know, get the compiler, working at a figure,
Speaker:
00:04:15
all the compiler flags for that chip.
Speaker:
00:04:16
And then the BSP for the board for the chip is on dah, dah, dah.
Speaker:
00:04:20
And so it take you like maybe a week to get just a winking.
Speaker:
00:04:23
And are doing and then Arduino made it so you can get to blinking
Speaker:
00:04:26
Elin led in like five minutes.
Speaker:
00:04:27
Okay.
Speaker:
00:04:28
That's yeah.
Speaker:
00:04:28
A week to five minutes is a good story to have
Speaker:
00:04:31
their focus was more on pedagogy.
Speaker:
00:04:33
Let's figure out how to teach people what to do with these boards once they work.
Speaker:
00:04:38
And so like, okay, let's assume you can read buttons and light
Speaker:
00:04:41
LEDs and make tones on a beeper.
Speaker:
00:04:44
The now what are you doing with that?
Speaker:
00:04:45
And so that was really their focus.
Speaker:
00:04:47
And so they made this very nice, simple.
Speaker:
00:04:50
Since you said of macros and libraries on top of CNC, plus plus for the 80
Speaker:
00:04:55
mega, that was a really good model for how, how one should do sort of
Speaker:
00:05:00
platform independent software design.
Speaker:
00:05:02
And so that's why I sent me that I think that that's one of reasons why we've seen
Speaker:
00:05:05
the explosion of Arduino for everything like any, any board that comes out.
Speaker:
00:05:08
There's usually almost always an Arduino core for it very shortly.
Speaker:
00:05:12
And the other thing that I think that, that made it doing
Speaker:
00:05:14
a successful was it has whole.
Speaker:
00:05:17
Instead of pins where you can plug wires into, whereas all the other boards
Speaker:
00:05:21
before then they had male pin headers.
Speaker:
00:05:24
And so you had to like figure, well, what do I plug onto a male pin header?
Speaker:
00:05:27
You know, whereas everyone, you just know how to stick a
Speaker:
00:05:29
wire into a little tiny hole.
Speaker:
00:05:32
The things
Speaker:
00:05:33
we take for granted, I wasn't doing anything in the maker community,
Speaker:
00:05:36
you know, 10, 15 years ago.
Speaker:
00:05:37
And so to me to hear that could take a week.
Speaker:
00:05:39
I'm like my eyes go wide just to make an led.
Speaker:
00:05:43
You know, much less trying to figure out what the
Speaker:
00:05:45
plugin were.
Speaker:
00:05:46
Totally.
Speaker:
00:05:46
Yeah.
Speaker:
00:05:47
So seeing this explosion and ease of use as someone, me who like
Speaker:
00:05:51
struggled for the week or multiple chips to get it up and running, I was
Speaker:
00:05:54
like, okay, I'm all in an Arduino.
Speaker:
00:05:56
And I really liked Arduino because not only was it easy to use to do
Speaker:
00:05:59
the normal stuff, but because it was just a thin framework on top of.
Speaker:
00:06:04
You could delve into low-level C you could delve into assembly
Speaker:
00:06:07
if you need to do stuff.
Speaker:
00:06:08
And so like, oh, I need to make the signal actually output in the megahertz range.
Speaker:
00:06:13
I can do that with a couple of assembly instructions.
Speaker:
00:06:15
I can't do that in normal C I can't do that Arduino, but that's okay.
Speaker:
00:06:19
I can just make a function that looks to Arduino, like a normal C function,
Speaker:
00:06:22
but then does the magic fast twiddling in assembly are, do we know doesn't
Speaker:
00:06:26
really present you with a flow?
Speaker:
00:06:29
With what to do with a chip, you can just go down as far as you want.
Speaker:
00:06:31
It is presented with a ceiling because it's really hard to do
Speaker:
00:06:34
certain common things that you might want to do with embedded systems.
Speaker:
00:06:38
Like just adding two strings together, like in cat needing two
Speaker:
00:06:41
strings in C and C plus plus is hard.
Speaker:
00:06:43
Even now.
Speaker:
00:06:44
It's still hard.
Speaker:
00:06:45
I mean, it's kinda hard, harder in Arduino C plus plus than it is in normal
Speaker:
00:06:49
C plus plus because normally C plus plus has all these like new fancy classes.
Speaker:
00:06:53
But yes.
Speaker:
00:06:54
Still.
Speaker:
00:06:54
Why is it so hard?
Speaker:
00:06:55
Why, why is memory management so hard?
Speaker:
00:06:57
And it's just like, well, is it, that's just the nature of how it all works.
Speaker:
00:06:59
And so doing anything network-based where you're talking with HTP or ELLs,
Speaker:
00:07:04
getting down texts and parsing texts.
Speaker:
00:07:05
That's pretty hard to do in CNC plus plus Arduino.
Speaker:
00:07:09
And so are doing a very good no floor, but you know, it's got a,
Speaker:
00:07:12
got a hard ceiling to get through.
Speaker:
00:07:14
So one of the things you've been sharing on Twitter lately, as you play with
Speaker:
00:07:17
our Duino is your synthesizer sound.
Speaker:
00:07:20
So you've got a couple of different sense out there.
Speaker:
00:07:22
Where does that?
Speaker:
00:07:23
I come from, I've been doing music stuff since basically the very beginning.
Speaker:
00:07:28
I used some extra scholarship money in college to get my first synthesizer
Speaker:
00:07:32
in sampler and, um, nice back.
Speaker:
00:07:35
Yeah.
Speaker:
00:07:35
Back, you know, in the long ago time.
Speaker:
00:07:36
And so I've been, I've been doing since stuff in various ways in various.
Speaker:
00:07:40
The kinds of things for the very beginning, our mutual friend, John
Speaker:
00:07:44
Park has been doing your rec stuff, a couples for a couple of years.
Speaker:
00:07:48
And so that started me getting into making little Eurorack modules, which
Speaker:
00:07:52
this is one of, this is actually, this runs, this runs on a trinket from Meda
Speaker:
00:07:56
fruit, which also runs circuit Python.
Speaker:
00:07:57
But usually you need to do something or do we know like, or C, C plus plus space to
Speaker:
00:08:02
do actual audio output from these modules?
Speaker:
00:08:04
And so, yes, all of my little modules nowadays, how middle synthesizers
Speaker:
00:08:08
have been looking like this?
Speaker:
00:08:09
Which is a little Joe with a bunch of knobs and it makes noise.
Speaker:
00:08:15
I figured out a picture of that included in the show notes for those
Speaker:
00:08:17
who aren't watching on YouTube.
Speaker:
00:08:20
So tell me about some of the synth projects that you've
Speaker:
00:08:22
been sharing on YouTube.
Speaker:
00:08:23
How do you make those sounds?
Speaker:
00:08:24
How do you combine them?
Speaker:
00:08:25
Ah,
Speaker:
00:08:26
so the cool thing is that there's two really interesting projects out there.
Speaker:
00:08:30
If you're just doing, doing this one is called Mazi.
Speaker:
00:08:32
Mozz I?
Speaker:
00:08:33
And it's been around for about a decade.
Speaker:
00:08:35
Made for the original, the original Arduino, and it is a synthesis library.
Speaker:
00:08:41
So it's got, it's sort of like a little modular synthesizer.
Speaker:
00:08:43
You've got an oscillator object and you've got a filter object.
Speaker:
00:08:46
You've got an envelope object and you connect them together.
Speaker:
00:08:50
You mentioned the same way that you might.
Speaker:
00:08:51
Connect modular synthesizer modules together.
Speaker:
00:08:54
And so one of the, uh, standard signal flow in a synthesizer where
Speaker:
00:08:57
you have an oscillator and that goes to an envelope to control,
Speaker:
00:09:00
like the loudness of the oscillator.
Speaker:
00:09:02
And then that goes to a filter can to control the brightness
Speaker:
00:09:05
or dullness of the sound.
Speaker:
00:09:07
It's like the block.
Speaker:
00:09:08
You'd hear is, is the filter, is the filter being modulating.
Speaker:
00:09:10
And then, and then you might have modulators coming in from the bottom
Speaker:
00:09:13
to modulate, like say the pitch of the oscillator or the cutoff of the filter.
Speaker:
00:09:18
And, um, and so the pitch of the oscillators, how you changed the
Speaker:
00:09:20
notes, you know, and it's really just, you describe a signal flow
Speaker:
00:09:24
and then you describe like how those have the signal is being modulated.
Speaker:
00:09:27
And, um, and it's pretty easy to hook up.
Speaker:
00:09:30
And so I had seen this a long time ago.
Speaker:
00:09:32
Totally ignored it.
Speaker:
00:09:33
A friend of mine online, Emily Valasco, she's been doing some fun little art
Speaker:
00:09:36
projects using Mazi, and I'm like, oh, I wonder if Mazi works on these newer
Speaker:
00:09:40
chips, like the little cutie pie, the ones that are based on the D 21, the arm, arm
Speaker:
00:09:45
processor, and somebody did the work of, of making it work on the San Antonio one.
Speaker:
00:09:50
So I was like, oh, awesome.
Speaker:
00:09:51
I'm going to do that.
Speaker:
00:09:52
Cause, cause you know, for a bang for your buck, a little cutie pie is.
Speaker:
00:09:57
Computer in this little stamp size package and acuity runs how much roughly,
Speaker:
00:10:01
like, I dunno, $8, something like that.
Speaker:
00:10:04
Yeah.
Speaker:
00:10:06
And sometimes you can find them on sale.
Speaker:
00:10:07
And so there they are a really good Arduino platform because they're so
Speaker:
00:10:10
powerful compared to what Arduino is really originally designed to run on.
Speaker:
00:10:14
And so Mazi runs great on this.
Speaker:
00:10:15
You can run like, you know, 32 oscillators and multiple filters and all this
Speaker:
00:10:19
modulation, and I'm not even hit the limit yet, or what's possible using these.
Speaker:
00:10:24
Um, been working towards to scene working to make it break.
Speaker:
00:10:29
That's always the fun part of these projects.
Speaker:
00:10:31
And so you had to fix it.
Speaker:
00:10:32
Yeah.
Speaker:
00:10:32
That's sort of like the lo-fi library is Mazi because it was made for Arduino.
Speaker:
00:10:37
Everything's kind of eight bit, eight bit sound.
Speaker:
00:10:39
Now, if you get into the TNC world, TNC, Baya, By Paul Stauffer
Speaker:
00:10:44
Stauffer's, Stouffer's African how to say his last name, but PJ rc.com.
Speaker:
00:10:48
Uh, they make this great line of boards called TNCs and he made this really great
Speaker:
00:10:53
library called the teensy audio library.
Speaker:
00:10:55
And it's got a gooey web gooey.
Speaker:
00:10:58
We can describe how.
Speaker:
00:11:00
Objects connect in terms of the signal flow.
Speaker:
00:11:02
And that generates a little chunk of Arduino code.
Speaker:
00:11:04
You copy into your sketch.
Speaker:
00:11:06
And then all you have to do is kind of set up all the modulation like, oh, I
Speaker:
00:11:09
want to have the pitch change and I want to have the envelope change or whatever.
Speaker:
00:11:13
And that sound is made to sound like CD quality.
Speaker:
00:11:17
And so I've been playing with on the sort of higher quality and playing
Speaker:
00:11:20
with TNCs and there has been a.
Speaker:
00:11:23
Of the TNC library for the Sam D 51 ships, which are like the, the feather Infowars.
Speaker:
00:11:29
Itsy-bitsy M fours.
Speaker:
00:11:31
And that's pretty good too.
Speaker:
00:11:31
I think the audio quality isn't as good as on the TNC, but I've not
Speaker:
00:11:35
looked into this much because I actually kind of like a low-fi sound.
Speaker:
00:11:38
It's kind of fun.
Speaker:
00:11:38
It's it kind of reminds me of the eighties almost, you know, I
Speaker:
00:11:41
said it's even Twitter.
Speaker:
00:11:42
It takes me back to those John Carpenter movies, like the thing
Speaker:
00:11:45
or any one of his movies that he composed the music for himself,
Speaker:
00:11:49
because that's all he does is since.
Speaker:
00:11:53
Instantly transported to being a kid
Speaker:
00:11:54
again, when the only sounds you can make or 80 style sounds, I've been making 80
Speaker:
00:11:59
style sounds because, because of the fact that like, okay, this is what I can do.
Speaker:
00:12:02
And so that's why once I actually started playing around with the
Speaker:
00:12:04
TNC sophomore, I made ma might make stuff that sounds like it's from
Speaker:
00:12:07
the nineties, maybe that's right.
Speaker:
00:12:12
So I'm just starting guitar samples.
Speaker:
00:12:14
So what does circuit Python need to do to kind of catch up in that sound space?
Speaker:
00:12:19
So I think a lot of what you described
Speaker:
00:12:20
they can't do today.
Speaker:
00:12:21
Yeah.
Speaker:
00:12:22
Not really.
Speaker:
00:12:22
One of the really interesting things is that circuit Python, just out of the
Speaker:
00:12:26
box supports the ability to play a wave file, which if you've ever tried to do
Speaker:
00:12:31
that or do we know it's a real payment, but because they're good, Python has
Speaker:
00:12:34
all this other stuff happening for like, it's got the idea of a file system, you
Speaker:
00:12:38
know, like a directory with files in it.
Speaker:
00:12:40
Right.
Speaker:
00:12:40
It's got the.
Speaker:
00:12:42
Audio driver low-level DMA stuff set up on almost all the chips that have supports.
Speaker:
00:12:48
And so you can just say play WAV file, like, you know, audio.play and give it a
Speaker:
00:12:53
file name and it'll play that wave file.
Speaker:
00:12:56
And that's amazing.
Speaker:
00:12:56
And you can even tell it's a loop, so it'll loop seamlessly.
Speaker:
00:12:59
So if you've got a perfect little rhythm center, And you still have to play.
Speaker:
00:13:03
It'll just keep playing it.
Speaker:
00:13:04
And that's great.
Speaker:
00:13:05
And it's even got an audio mixer object.
Speaker:
00:13:07
So in theory, you could have multiple wave files, you just tell to play and they
Speaker:
00:13:11
can then like over overlap each other.
Speaker:
00:13:13
And so you can kind of create a little, little sample player.
Speaker:
00:13:16
She was saying, I did not know that.
Speaker:
00:13:18
So there's a couple of problems though.
Speaker:
00:13:19
One is that you can't really change the pitch.
Speaker:
00:13:21
Of the samples without changing the sample rate of the entire system.
Speaker:
00:13:26
So basically you can change the pitch of everything, but not, not just one sample.
Speaker:
00:13:30
That could be a challenge and doing, doing pitch shifting is a non-trivial task.
Speaker:
00:13:33
So it's not like, it's not like, oh, I didn't these bozos think of this.
Speaker:
00:13:36
Like, no, no, that's actually a really hard problem.
Speaker:
00:13:38
And, uh, the other thing is the audio mixer seems to not quite work for, in
Speaker:
00:13:43
some of the cases I was using it with.
Speaker:
00:13:45
And so maybe I'm just using it wrong, but I was having a hard time getting the
Speaker:
00:13:48
audio mixer to work with more than one.
Speaker:
00:13:50
And more than one object.
Speaker:
00:13:51
So, but then there's the whole that meshes like sample playback.
Speaker:
00:13:55
If you're doing synthesis, like what I was talking about with Mazi
Speaker:
00:13:58
and with the TNC audio library, that's a whole other can of worms.
Speaker:
00:14:02
It's, it's very similar in that you often create a small buffer.
Speaker:
00:14:06
That's sort of like a sample of the thing is played out and then you
Speaker:
00:14:08
just refill that buffer and just keep playing and playing it out.
Speaker:
00:14:11
There's a whole level of, uh, I don't know what it would say.
Speaker:
00:14:15
Like just objects and a framework for how the data gets
Speaker:
00:14:18
fed regularly into the system.
Speaker:
00:14:21
And the TNC audio library has solved a lot of this, but it solved it in
Speaker:
00:14:24
an Arduino way, which is you can make a lot of stuff, very efficient to
Speaker:
00:14:27
compile time with Arduino that you can't do in circuit Python, because
Speaker:
00:14:31
Python, everything is done at runtime.
Speaker:
00:14:33
Right?
Speaker:
00:14:33
And so there's, I think the TNC audio library and Mazi does a
Speaker:
00:14:37
bunch of stuff where it allocates a bunch of buffers statically, and.
Speaker:
00:14:41
Sets up pointers to them in various ways, statically, so that it's all
Speaker:
00:14:44
very fast and efficient and can operate, you know, maximum rate.
Speaker:
00:14:48
And you just can't do that.
Speaker:
00:14:49
And surrogate Python, because of everything kind of the system doesn't
Speaker:
00:14:52
know what libraries are going to load.
Speaker:
00:14:53
We can say import library name.
Speaker:
00:14:56
And so it has to, it has to be very flexible and that flexibility
Speaker:
00:14:58
comes at a cost of speed.
Speaker:
00:15:00
But I think it's possible if there is an open issue on the circuit Python.
Speaker:
00:15:03
I get hub for adding the TNC audio library.
Speaker:
00:15:06
So if anybody has any thoughts on how to do this, please add to the
Speaker:
00:15:10
discussion there because I'm super, super excited to see it happen.
Speaker:
00:15:13
We'll link to
Speaker:
00:15:14
that in the show notes as well.
Speaker:
00:15:16
So the takeaway there is audio is hard and we need someone to come help.
Speaker:
00:15:20
Yeah.
Speaker:
00:15:20
Get some sense of
Speaker:
00:15:21
good that I think it's within the realm of possibility.
Speaker:
00:15:25
One thing at a time.
Speaker:
00:15:28
Hey, it's Paul, I'll get you back to the show in just a moment.
Speaker:
00:15:31
I wanted to say thank you for listening.
Speaker:
00:15:32
If you liked the show, please hit the subscribe button, write
Speaker:
00:15:35
a review or tell a friend.
Speaker:
00:15:36
You hear that a lot, but it really does help for other ways to help the show.
Speaker:
00:15:39
Visit circuit Python, show.com/support.
Speaker:
00:15:42
Now back to the show.
Speaker:
00:15:44
So you started using circuit Python after all those years of Arduino.
Speaker:
00:15:48
Start to learn Python C Python itself.
Speaker:
00:15:51
How has that, how has that journey been?
Speaker:
00:15:53
Has it been easy to pick up some of the big Python stuff starting with the smaller
Speaker:
00:15:56
building?
Speaker:
00:15:57
Oh, very much.
Speaker:
00:15:58
Yeah.
Speaker:
00:15:58
If you have not learned much Python, I would say just ignore all the other
Speaker:
00:16:03
Python stuff out in the world and try circuit Python first, because.
Speaker:
00:16:07
Python is used for a lot of really big projects.
Speaker:
00:16:11
And there's a lot of like heavy prerequisites that can, that
Speaker:
00:16:15
can be used for doing what are seemingly simple things.
Speaker:
00:16:19
And like, for instance, oh, I want to, like, I want to brighten this.
Speaker:
00:16:23
And suddenly you're installing a num PI this huge numerical analysis package.
Speaker:
00:16:28
And like, no, no, I just want to brighten this image.
Speaker:
00:16:30
You know, it's like, I don't want to like load up this gigabyte library for Python.
Speaker:
00:16:34
And that requires like all these C library.
Speaker:
00:16:36
It's like, it's like, no, no, no.
Speaker:
00:16:37
It's like choose a smarter thing.
Speaker:
00:16:39
Like maybe choose.
Speaker:
00:16:39
I want to build a small robot and I've got two little lights,
Speaker:
00:16:43
sensors, and two little wheels.
Speaker:
00:16:45
And he was like, I, you know, I've been programming C for.
Speaker:
00:16:49
Most of my life.
Speaker:
00:16:50
And I'm a big believer in the curly brace and the idea of not having block
Speaker:
00:16:56
markers like Python, you just indent indicate a block is just, it was,
Speaker:
00:17:00
it just didn't make any sense to me.
Speaker:
00:17:02
I still have a hard time with it sometimes as a way of like Python could do so much.
Speaker:
00:17:06
And circle Python is a really interesting way to think about micro-controllers
Speaker:
00:17:09
because since it's very high level, like it has a much higher floor than Arduino.
Speaker:
00:17:15
Like you start out being able to add strings.
Speaker:
00:17:18
Easily, you start out having a little file system with a bunch
Speaker:
00:17:22
of files that you just read from.
Speaker:
00:17:23
You can store like a Jason file for configuration on the circuit PI
Speaker:
00:17:28
drive, and just load it up and say, okay, how am I supposed to behave?
Speaker:
00:17:31
And you can then write back to that file.
Speaker:
00:17:33
If you want to like, save the state of your program.
Speaker:
00:17:35
Like, these are things that are really hard to do in Arduino.
Speaker:
00:17:38
And there's like, bam, easy.
Speaker:
00:17:39
Like you don't have to think about it.
Speaker:
00:17:40
So it's much
Speaker:
00:17:41
more like using a computer, right?
Speaker:
00:17:43
I'm used to saving a file on my drive.
Speaker:
00:17:45
I can save a secret step by file with.
Speaker:
00:17:47
Wireless ID inside of it.
Speaker:
00:17:49
Exactly that.
Speaker:
00:17:49
And so for doing, but at the same time, it is super constrained.
Speaker:
00:17:53
Like, like you can't do everything, like all the possible things you
Speaker:
00:17:57
want to can do on a computer with Python, you can't do a circuit Python
Speaker:
00:18:01
on most of the circuit on boards.
Speaker:
00:18:02
You can access the internet, you know, you can't draw to a
Speaker:
00:18:05
screen because there's no screen.
Speaker:
00:18:07
And so it's a fun.
Speaker:
00:18:08
Like sort of micro universe of a problems, like, okay, well, I've got the
Speaker:
00:18:12
ability to read buttons and I've got the ability to write to a little led strip.
Speaker:
00:18:17
And just that will teach you a lot about how Python thinks about
Speaker:
00:18:21
data structures and about Python, the things about structuring code.
Speaker:
00:18:25
And so just thinking about the small parts of Python for me was really
Speaker:
00:18:31
helpful because now I feel like I can actually look at the larger project.
Speaker:
00:18:34
In computer Python, desktop Python, and go, oh, I see what they're doing.
Speaker:
00:18:38
Cause, cause like I looked at trying to do a aesthetic website generator
Speaker:
00:18:42
that was using some Python framework.
Speaker:
00:18:44
I was just like, man, this is a lot.
Speaker:
00:18:45
This is assuming a lot of knowledge about how Python thinks that I don't even have.
Speaker:
00:18:50
Cause I don't, I don't know how Python thinks yet.
Speaker:
00:18:52
And in circuit path and kind of helps you think about Python.
Speaker:
00:18:54
Python thinks about itself
Speaker:
00:18:58
built on the backs of giants, right?
Speaker:
00:19:00
Between C Python and micro Python, doing a lot of that heavy lifting
Speaker:
00:19:03
to help get us where we are today with circuit by thought it was just
Speaker:
00:19:05
absolutely.
Speaker:
00:19:06
Yeah, exactly.
Speaker:
00:19:07
And so one of the differences between circuit Python and micro Python, I think
Speaker:
00:19:10
is that Scott with circuit Python has very explicitly tried to make circuit Python.
Speaker:
00:19:16
Work-like and look like and remold, desktop Python, whereas micro Python
Speaker:
00:19:22
is okay with saying, okay, we're going to, we're going to go away
Speaker:
00:19:25
from how desktop Python does things.
Speaker:
00:19:27
Cause it's less efficient because we want to do these
Speaker:
00:19:29
microcontrollers specific things.
Speaker:
00:19:32
And so there's like best suited for ways to different philosophies
Speaker:
00:19:35
of approaching the problem.
Speaker:
00:19:36
And then they're both valid, you know, like I use micro Python
Speaker:
00:19:38
for some things, but if you are looking to learn more about how.
Speaker:
00:19:43
Desktop Python works doing circuit Python.
Speaker:
00:19:45
We'll be, we'll think we'll help you more.
Speaker:
00:19:47
I agree.
Speaker:
00:19:47
And you know, I came late to the party.
Speaker:
00:19:49
I didn't learn how to code until I was well into my forties.
Speaker:
00:19:51
Oh, wow.
Speaker:
00:19:52
And started with Python.
Speaker:
00:19:53
This is, you know, four or five years ago coming to circuit
Speaker:
00:19:56
Python was a little easier.
Speaker:
00:19:58
I, you know, the codes readable.
Speaker:
00:19:59
I understand what it's doing, but whenever I talk to someone and they're
Speaker:
00:20:02
like, How do you know what you want to build or what you want to do?
Speaker:
00:20:05
I think the best part about circuit Python is go to learn that data fruit.com.
Speaker:
00:20:09
And I don't mean to sound like a commercial forum, but there's 2000
Speaker:
00:20:11
guides there.
Speaker:
00:20:13
Wow.
Speaker:
00:20:14
That's awesome.
Speaker:
00:20:14
And if you're one of those people that learns by hands-on doing it.
Speaker:
00:20:18
They've got it all laid out for you.
Speaker:
00:20:19
Here's the parts you need to buy.
Speaker:
00:20:20
Here's what you need to do.
Speaker:
00:20:22
And then go try and hopefully it works.
Speaker:
00:20:24
Yeah.
Speaker:
00:20:24
There's a great amount of learning to be had just by, just by going through
Speaker:
00:20:28
the GitHub for various sort of Python libraries, like be the eight or free
Speaker:
00:20:33
libraries or other libraries, just go like, oh, you know, how come the Neo
Speaker:
00:20:36
pixels look like a list where you, how you can do little like sub scripting of like,
Speaker:
00:20:40
you know, 0 1, 2, 3 to access the zero.
Speaker:
00:20:44
Second led it's like, how is it?
Speaker:
00:20:46
You can do that with an object in Python.
Speaker:
00:20:47
It's like, well, you just look at the Neo pixel library on GitHub and say, oh, there
Speaker:
00:20:51
are these special functions you can do.
Speaker:
00:20:53
And everything is an
Speaker:
00:20:54
object.
Speaker:
00:20:56
It's Python.
Speaker:
00:20:57
Yeah.
Speaker:
00:20:57
Yeah.
Speaker:
00:20:57
No.
Speaker:
00:20:57
And so it's, so it's really, it's really cool.
Speaker:
00:20:59
I was like, oh, like I see a library doing this interesting thing.
Speaker:
00:21:02
How does this library do this?
Speaker:
00:21:03
Everything?
Speaker:
00:21:03
Well, you can just look at the source code and go, oh, I see.
Speaker:
00:21:07
And that's
Speaker:
00:21:07
the beauty of it being.
Speaker:
00:21:08
And, you know, open source and free software is we can keep giving back.
Speaker:
00:21:12
You can learn from it, you can modify it.
Speaker:
00:21:15
You gotta love it.
Speaker:
00:21:15
Yeah.
Speaker:
00:21:16
But I'm gonna say there are some Python things, some sort of Python
Speaker:
00:21:19
things that have totally just kept slipping out of my brain.
Speaker:
00:21:22
And so two years ago, I forget what it was, but I started because I'm a big
Speaker:
00:21:27
fan of these little cutie pie things.
Speaker:
00:21:29
I started a cutie pie tricks, GitHub repo.
Speaker:
00:21:31
That was just a list of things of me.
Speaker:
00:21:34
It was around Halloween.
Speaker:
00:21:35
So a lot of the, a lot of the tricks or how to do Halloween.
Speaker:
00:21:39
Sort of things, but it was a li it was essentially a list for me to remind
Speaker:
00:21:43
myself, oh, how do I control a servo?
Speaker:
00:21:45
How do I read a button?
Speaker:
00:21:47
And then Halloween passed.
Speaker:
00:21:48
And then I decided, you know what, this really should grow into a larger thing.
Speaker:
00:21:52
So I made a circuit Python tricks, repo.
Speaker:
00:21:55
It's just a list of all the same things.
Speaker:
00:21:56
So, so I always go back to that old, like, oh, that's right.
Speaker:
00:21:58
How do I do a D bounced button?
Speaker:
00:22:00
Oh, that's right.
Speaker:
00:22:01
I use this library and I.
Speaker:
00:22:03
Create the button this way.
Speaker:
00:22:04
And how do I fantastic.
Speaker:
00:22:08
I was just looking at your repository.
Speaker:
00:22:10
There's over 50 tips and tricks in there.
Speaker:
00:22:13
There's that many now.
Speaker:
00:22:14
And it's like, I'm mentally marking them down as I'm reading in my head.
Speaker:
00:22:17
Like, I need to make a note of that and that oh, that's how I do that.
Speaker:
00:22:20
So that's awesome that you shared that with everyone.
Speaker:
00:22:22
I mean, you know, I got to write things down as I get a little
Speaker:
00:22:25
bit older, so I totally get where you're coming from, but to take that
Speaker:
00:22:28
extra step and actually share it.
Speaker:
00:22:29
That's fantastic.
Speaker:
00:22:30
In my home directory on my laptop, I have a get dash hints dot TXT, a
Speaker:
00:22:37
image magic dash hens dot TXT image.
Speaker:
00:22:39
Magic is a tool used to do.
Speaker:
00:22:42
Image editing on the command line.
Speaker:
00:22:44
I have all these text files, just like me writing down things that I've typed
Speaker:
00:22:48
into the command line to, or typed inappropriate into in a program languages
Speaker:
00:22:52
to remind me, like, how do you do that?
Speaker:
00:22:54
Like, how do you list all the tags and get, cause I always forget that, you know,
Speaker:
00:22:57
that's my biggest problem.
Speaker:
00:22:59
Right.
Speaker:
00:22:59
And I'm sure other people do this as I've learned to program.
Speaker:
00:23:02
But I go solve my problem and then I don't have to visit it for another six months.
Speaker:
00:23:05
So when I come back six months later, I'm like, I really wrote that code.
Speaker:
00:23:10
So this is a
Speaker:
00:23:11
genius idea.
Speaker:
00:23:12
What is it?
Speaker:
00:23:13
This is why stack overflow is like the most popular website.
Speaker:
00:23:17
All right.
Speaker:
00:23:17
Well,
Speaker:
00:23:18
next up, we have a segment that I call turn the tables.
Speaker:
00:23:20
You know, I mentioned earlier, I'm a big vinyl record fan.
Speaker:
00:23:22
I've been asking all the questions.
Speaker:
00:23:24
Here's your chance to ask me anything.
Speaker:
00:23:26
All right.
Speaker:
00:23:26
This is sort of what I'm going to have a little prologue to this.
Speaker:
00:23:29
Right now as we're recording, this is at the end of January where everyone
Speaker:
00:23:32
in the community, or a lot of people in the community sort of post their public
Speaker:
00:23:36
wants and desires for circuit Python, either, either their personal desires
Speaker:
00:23:39
or like the desires for the language.
Speaker:
00:23:41
And mine was like, let's have an audio engine, like first
Speaker:
00:23:45
of the sizer type stuff.
Speaker:
00:23:47
Do you have any desires for circuit Python in the next year off the top
Speaker:
00:23:51
of my head, I don't.
Speaker:
00:23:53
And the reason being is that I'm still fairly new to the community.
Speaker:
00:23:55
I've been lurking for the last year, maybe a year and a half, but I'm still
Speaker:
00:23:59
getting to know a lot of folks in the podcast is a great way to do it.
Speaker:
00:24:02
You know, I'm not ready to, to jump out there and say, these are the
Speaker:
00:24:05
things I want to see from Python.
Speaker:
00:24:07
I'm excited to give back that I, uh, what I can write starting a podcast and
Speaker:
00:24:11
blogging a little more about my journeys and the things I'm trying to build.
Speaker:
00:24:15
What's a great question, but I'm still at that stage where I'm just.
Speaker:
00:24:18
Soaking it all in trying to figure out okay, who does,
Speaker:
00:24:20
what or where are those gaps?
Speaker:
00:24:22
Cause I don't even know what I don't know right now.
Speaker:
00:24:25
Totally.
Speaker:
00:24:25
Yeah.
Speaker:
00:24:25
That's that's the problem I'll have.
Speaker:
00:24:26
Right.
Speaker:
00:24:27
So besides the podcast, what other circuit Python related
Speaker:
00:24:29
projects are you anticipating for yourself in the coming year?
Speaker:
00:24:33
My PI
Speaker:
00:24:33
portal just arrived yesterday.
Speaker:
00:24:35
So my big project is, is.
Speaker:
00:24:38
So again, I'm a big vinyl record fan, and I'm just going to, you know, like a broken
Speaker:
00:24:42
needle, keep making bad jokes about it.
Speaker:
00:24:44
But, um, so I built a website using fast API and it's a random record generator.
Speaker:
00:24:49
So I've got about, let's say a thousand records.
Speaker:
00:24:52
I hit a button on this website.
Speaker:
00:24:53
It says, Hey, go play this record.
Speaker:
00:24:56
So I get up, I put it on, I come back in my office and my record
Speaker:
00:24:59
players in a separate room.
Speaker:
00:25:00
And I had it, so I could draw an eight bit map on a 64 by 64 led screen of
Speaker:
00:25:06
the cover art of what was playing.
Speaker:
00:25:07
So I'm using MQTT.
Speaker:
00:25:09
It'll send a message that if I'm the one who requests that
Speaker:
00:25:13
the random record push that.
Speaker:
00:25:16
To the PI portal.
Speaker:
00:25:17
Now I'm going to change it out for a pipe so I can get a higher quality image
Speaker:
00:25:20
to see the cover art, or whatever's playing 10 feet and pick up the record.
Speaker:
00:25:25
But it's one of those things, like I mentioned earlier, I learned by
Speaker:
00:25:28
that hands-on and this has got a little bit of everything, right?
Speaker:
00:25:31
There's that, that C Python and, you know, building a website, which is hard.
Speaker:
00:25:36
Too.
Speaker:
00:25:37
I had to build my own MQTT server, which still the servers running.
Speaker:
00:25:41
I haven't figured out how to use it.
Speaker:
00:25:43
One thing at a time, and then learning all the circuit
Speaker:
00:25:46
Python that goes on the boards.
Speaker:
00:25:47
And the, my first couple of tries with the matrix portal, I
Speaker:
00:25:50
was running into memory errors.
Speaker:
00:25:51
So that was fun.
Speaker:
00:25:53
And I literally do mean it was fun.
Speaker:
00:25:55
Learning about memory management and circuit Python and what
Speaker:
00:25:57
the constraints are there.
Speaker:
00:25:59
It wasn't fun that it didn't, it wasn't working when I thought it was.
Speaker:
00:26:01
But yeah, eventually
Speaker:
00:26:03
I got it there to kind of go back to the whole internet of things,
Speaker:
00:26:06
stuff that we kind of started with.
Speaker:
00:26:07
This was one of the biggest problems that I've had with people advocating
Speaker:
00:26:12
the internet of things, stuff.
Speaker:
00:26:13
Is it to be a really good participant on the net nowadays?
Speaker:
00:26:19
You have to have a pretty good.
Speaker:
00:26:21
Networking stack.
Speaker:
00:26:22
Like it's not just, it's not just, oh, I can, I can get an IP address
Speaker:
00:26:26
from the DHCP server and I can make this request like, no, no.
Speaker:
00:26:30
You've also got to do it securely with HTTPS or TLS, whatever.
Speaker:
00:26:34
You've also got to have certificate management.
Speaker:
00:26:36
So for when the certificates get expired or whatever, and.
Speaker:
00:26:40
There has to be a mechanism for updating the system for when
Speaker:
00:26:44
the inevitable problems happen and the underlying libraries.
Speaker:
00:26:46
Cause there's usually like, you know, some crypto library that gets gets bonked.
Speaker:
00:26:49
And so you get to like update that.
Speaker:
00:26:51
And so that's a lot of effort to put into a tiny mark controller
Speaker:
00:26:55
and the fact that circle Python confess your orals at all is amazing.
Speaker:
00:27:00
But it's often frustrating because a lot of the data sources
Speaker:
00:27:04
that are out there assuming.
Speaker:
00:27:05
You have the full weight of a computer behind the thing fetching and it's
Speaker:
00:27:10
like, no, no, I just want to kill it.
Speaker:
00:27:12
Bytes of data.
Speaker:
00:27:13
I don't want this 1.2 megabyte XML or JSON file.
Speaker:
00:27:17
You're giving me, let alone parsing that.
Speaker:
00:27:19
And so like, like a lot of times when you run into, out of memory errors,
Speaker:
00:27:23
when you're doing network fetches with circuit Python, it's probably because the
Speaker:
00:27:27
data feed is just too big for the Ram.
Speaker:
00:27:30
On the chip and it's not really a fault of circuit Python so much as
Speaker:
00:27:34
it's the fault of the fact that we.
Speaker:
00:27:36
We've got, we've got, we've got a sort of, uh, a technical culture of the feeds are
Speaker:
00:27:41
always the biggest feeds possible because we won't include all the information.
Speaker:
00:27:45
And there's no way of including, like asking for summaries or something.
Speaker:
00:27:49
So, like you said, at the beginning, we've taken, you know, in 2007, the iPhone
Speaker:
00:27:53
launched, we take for granted having these super computers in our pocket.
Speaker:
00:27:56
Right.
Speaker:
00:27:56
If I want to pull my phone out and check the scores on ESPN to see what the latest
Speaker:
00:28:00
football game is, they can deliver it.
Speaker:
00:28:02
Jason packet with all the teams scores times.
Speaker:
00:28:05
But if I only want that one little team, yeah, I can absolutely see
Speaker:
00:28:09
how memory being constrained on a microcontroller is very different than
Speaker:
00:28:13
what we want to do with our smartphone.
Speaker:
00:28:15
Yeah.
Speaker:
00:28:15
Like before the iPhone, there was this thing called lap wireless access protocol.
Speaker:
00:28:21
I think I wrote a couple of websites for this and you're fine.
Speaker:
00:28:24
And there, there were phones that had web browsers on them and.
Speaker:
00:28:28
They were a special cut down version.
Speaker:
00:28:31
Like even HTML was too big.
Speaker:
00:28:33
It was a special cutdown version of the tag language of HTML that was minimal.
Speaker:
00:28:38
And you would create a separate little index page instead
Speaker:
00:28:41
of the normal index page.
Speaker:
00:28:43
So you can browse it on your little, like Nokia.
Speaker:
00:28:45
Phone or whatever.
Speaker:
00:28:46
And it's sort of that, like, we need that level of ability to funnel down the data
Speaker:
00:28:51
feeds that are out there that like sort of Python is perfectly capable of fetching,
Speaker:
00:28:55
but it's not capable of fetching it all.
Speaker:
00:28:58
And so, you know, maybe yeah, since we probably can't change the world to
Speaker:
00:29:04
have the ability to have, have succinct data feeds, maybe you like, we could
Speaker:
00:29:08
create some sort of a streaming parser.
Speaker:
00:29:10
Yeah.
Speaker:
00:29:11
Sort of Python or maybe someone interesting like eight or fruit came out
Speaker:
00:29:14
like eight, a fruit IO they're sort of MQTT server thingy has some ability to
Speaker:
00:29:19
do some sort of collapsing of data feeds.
Speaker:
00:29:22
I think for certain, for certain data types, like time or date or something
Speaker:
00:29:25
it does.
Speaker:
00:29:26
And I know on the pipe portal, you can even send it a photo
Speaker:
00:29:29
and I'll send you back the.
Speaker:
00:29:31
And so like, if there was like a more extensive version of that where you
Speaker:
00:29:35
could, I don't even know how you, how one would configure it, be give it a
Speaker:
00:29:37
big data feed URL, and it would, and you can tell it which parts you wanted.
Speaker:
00:29:41
Like, oh, I only want the artist and title or something, like build
Speaker:
00:29:44
your own API out of the feed.
Speaker:
00:29:46
Yeah, exactly.
Speaker:
00:29:47
Todd, last question for you that I like to ask each guest, you're
Speaker:
00:29:50
starting a new project or prototype you reach for a microcontroller.
Speaker:
00:29:53
Which one is it?
Speaker:
00:29:54
Uh, so I think in the world of circuit Python, it might be useful to ask
Speaker:
00:30:00
what boards should I not start on?
Speaker:
00:30:02
One of the sort of like super starter boards was the surrogate Python express.
Speaker:
00:30:07
It's got the Sam D 21 chip on it and, uh, has a, um, a flat and
Speaker:
00:30:11
extra flash chip from our memory.
Speaker:
00:30:13
That's the one I started with.
Speaker:
00:30:14
Yeah.
Speaker:
00:30:14
And so.
Speaker:
00:30:15
Early sorta Python and then Arduino.
Speaker:
00:30:17
This is an amazing, powerful chip, but as circuit Python has grown up, its memory
Speaker:
00:30:21
requirements have, have grown a bit.
Speaker:
00:30:24
And also the things we want to do with circuit Python has grown.
Speaker:
00:30:27
And so you start to run into lack of Ram problems pretty quickly on this.
Speaker:
00:30:32
Board because of the chip that's on it.
Speaker:
00:30:34
And so I normally SU people away from the Sam D 21 based boards, like the
Speaker:
00:30:38
certified circuit playground express.
Speaker:
00:30:40
And so now, uh, and also because of the global component shortage, the
Speaker:
00:30:44
global electronic component shortage we've had for the last couple of
Speaker:
00:30:47
years, getting the chip that's.
Speaker:
00:30:49
This end and somewhere ones has been hard.
Speaker:
00:30:52
And so that's why you've seen a lot of RP, 20, 40 based boards, and a
Speaker:
00:30:55
lot of ESP 32 based boards, because those two manufacturers have had
Speaker:
00:30:59
a different, a different resource allocation budget or something.
Speaker:
00:31:02
So they, so they actually have, have chips available.
Speaker:
00:31:05
And, um, and so I would say, so it is, uh, the NC Bisi line
Speaker:
00:31:10
from, from eight of fruit.
Speaker:
00:31:12
It's not a lot of love, uh, because the there's the.
Speaker:
00:31:15
Powerful feather format.
Speaker:
00:31:17
That's basically the same thing, but a little bit bigger.
Speaker:
00:31:19
It has like battery circuitry.
Speaker:
00:31:20
This has no battery circuitry, but this also has a level shifter up to five volts
Speaker:
00:31:25
on one of the pins for driving Neo pixels.
Speaker:
00:31:28
So if you're into LEDs, this is a good one to get three
Speaker:
00:31:31
to five volts can make a big difference.
Speaker:
00:31:35
A lot of Neo pixels strips will work just fine when you feed them with
Speaker:
00:31:38
a three volt data line, but a lot don't they get like weird flicker in.
Speaker:
00:31:41
So like, Hey, just avoid the problem.
Speaker:
00:31:43
Get the level shift built on.
Speaker:
00:31:46
So that's, if you want to like start if you're like an Arduino, so like a
Speaker:
00:31:48
fairly experienced Arduino person and you're used to breadboards and all this
Speaker:
00:31:51
kind of stuff, and you're used to, you used to be doing like little, you know,
Speaker:
00:31:55
jumper wires and things like that.
Speaker:
00:31:57
Then it's C I think is one of the best deals.
Speaker:
00:31:59
It's like pretty cheap, cheaper than the feather.
Speaker:
00:32:01
Cause it doesn't have all the battery handled or circuitry.
Speaker:
00:32:03
And of course, you know, our, do we know what certified on if you're
Speaker:
00:32:06
not, not in like a, uh, uh, coming from Arduino and you're kind of
Speaker:
00:32:10
coming to circuit Python from.
Speaker:
00:32:14
The computer world and you probably want to be doing a lot of networky stuff.
Speaker:
00:32:18
So I'd say use a board, this based off of the ESP 32 S two chip, which is a
Speaker:
00:32:23
wifi chip that can run circle Python.
Speaker:
00:32:25
And one of the best boards I've found for this is the eight fruit fund house,
Speaker:
00:32:29
which has a really great, like high Rez, two 40 by two 40 LCD screen on it.
Speaker:
00:32:35
And it's got a couple of buttons and it's got.
Speaker:
00:32:38
Cap sense, touch sensors.
Speaker:
00:32:39
And it's got a little, a thing up here for a motion detector and it's got
Speaker:
00:32:43
a beeper on it and a bunch of like, you know, IO connectors on the side.
Speaker:
00:32:46
And I came with a little plate.
Speaker:
00:32:48
So laser cut plates, you can like, hang it on a wall, but it's super handy
Speaker:
00:32:52
because like, you know, when you're doing wifi stuff, having a screen to
Speaker:
00:32:56
tell you what the heck is going on.
Speaker:
00:32:58
Can it find the wifi?
Speaker:
00:32:59
Is it connected to wifi?
Speaker:
00:33:01
Can it find the server it's trying to, to there's all these ways
Speaker:
00:33:04
that network devices can go bad.
Speaker:
00:33:06
And so having a screen can be real easy because circle Python will automatically
Speaker:
00:33:11
use a display as its display outputs.
Speaker:
00:33:14
Like even when an error happens, when it like airs out and crashes, it'll
Speaker:
00:33:17
print the error message on the screen.
Speaker:
00:33:19
So that's, that's super handy.
Speaker:
00:33:20
If you want something a little cheaper, there's a really
Speaker:
00:33:22
great board using the same.
Speaker:
00:33:25
From a company called Lily go they're available on AliExpress.
Speaker:
00:33:28
And the cool thing about this is you can see it's got a little SD
Speaker:
00:33:31
card holder on the back, so you can actually have put more memory on it.
Speaker:
00:33:36
So you can store like a whole bunch of data.
Speaker:
00:33:38
Like if you're pulling data down from the internet or.
Speaker:
00:33:40
Pushing data up on whatever it's only got.
Speaker:
00:33:43
I think it's got one button that's usable by the user on the
Speaker:
00:33:45
front, which isn't that cool.
Speaker:
00:33:47
But the display is really crisp and clean and fast.
Speaker:
00:33:50
Also the antenna on this is a bit better, I think, than what's on the Funhouse.
Speaker:
00:33:54
So I think it seems to get a little, a little bit longer range.
Speaker:
00:33:57
It's not as fast to get like the.
Speaker:
00:33:59
You can get it from like Digi-Key or ate a fruit.
Speaker:
00:34:02
And they'll just like, you know, there'll be there in a couple of days.
Speaker:
00:34:03
Ali express could be a month.
Speaker:
00:34:06
Yeah, exactly.
Speaker:
00:34:07
And the other nice thing is that if you're getting started with like
Speaker:
00:34:08
a Python and you want to play with a bunch of the interesting sensors
Speaker:
00:34:11
based off of the stomach UT protocol, it's got a stomach UT Jack's you
Speaker:
00:34:16
can just start plugging connectors.
Speaker:
00:34:18
Sorry.
Speaker:
00:34:18
Play.
Speaker:
00:34:19
Plugging sensors in.
Speaker:
00:34:21
And, um, and so that's kinda my two, my two forks in the road is
Speaker:
00:34:25
like, are you an Arduino person?
Speaker:
00:34:26
When you're closer to Python, then use the Etsy.
Speaker:
00:34:30
And if you're a kind of Python person wouldn't to get into circuit Python,
Speaker:
00:34:33
then get something like the fun house.
Speaker:
00:34:36
Oh, those are great
Speaker:
00:34:36
picks.
Speaker:
00:34:37
I'll make sure that I linked them in the show notes to see us through the podcast.
Speaker:
00:34:41
I'll give you links to all these, if you need them.
Speaker:
00:34:44
Awesome.
Speaker:
00:34:44
Perfect.
Speaker:
00:34:45
Well, thanks again for being on the show.
Speaker:
00:34:46
Thanks
Speaker:
00:34:47
man.
Speaker:
00:34:48
Thank you for listening to the circuit Python show.
Speaker:
00:34:50
This was episode four with guest Todd Kurt recorded February 1st, 2022.
Speaker:
00:34:56
Thank you for listening to the circuit Python show an independent
Speaker:
00:34:59
podcast with the people in and around circuit Python for show notes,
Speaker:
00:35:03
transcripts, and to support the show.
Speaker:
00:35:04
Visit circuit Python, show.com.
Speaker:
00:35:07
I'm your host, Paul Cutler, and I'll be back next episode.
Speaker:
00:35:10
Don't forget to hit subscribe and stay safe.
00:00:01
Welcome to the circuit Python show an independent podcast with the
Speaker:
00:00:04
people in and around circuit Python.
Speaker:
00:00:06
I'm your host, Paul Cutler.
Speaker:
00:00:07
This week, I'm joined by Todd Curt.
Speaker:
00:00:09
Todd is the co-founder of thing.
Speaker:
00:00:10
M a ubiquitous computing and internet of things.
Speaker:
00:00:13
Device studio based in Pasadena in San Francisco is the creator of the popular
Speaker:
00:00:17
blink USB notification light and blink on the smart led prototyping device.
Speaker:
00:00:22
Todd is a contributor to make magazine the author of the book hacking room.
Speaker:
00:00:26
And the active member in the Arduino community and co-founder of the Los
Speaker:
00:00:30
Angeles hackerspace crash space.
Speaker:
00:00:32
His password includes being the original systems architect of goto.com.
Speaker:
00:00:36
The first public pay per click search engine in a researcher
Speaker:
00:00:39
and Yahoo research lab.
Speaker:
00:00:41
Before that Todd was a hardware, software and firmware engineer
Speaker:
00:00:44
working on robotic camera systems for probes that went to Mars.
Speaker:
00:00:49
Nice to meet
Speaker:
00:00:49
you.
Speaker:
00:00:49
Great to have you.
Speaker:
00:00:50
So when I was reading your bio, it mentioned that you
Speaker:
00:00:52
found a thing, AMA ubiquitous computing and IOT device studio.
Speaker:
00:00:56
What exactly is
Speaker:
00:00:57
?The, well, it was back in 2006 and that was when the whole idea of
Speaker:
00:01:03
imagine a world where devices all around us are talking to each other
Speaker:
00:01:07
and maybe talking on the internet, you know, that was sort of a fantasy.
Speaker:
00:01:11
And so me and my co-founder, we were trying to make a.
Speaker:
00:01:15
Imagine a world where devices were smart, like everyday household
Speaker:
00:01:19
devices be they dressers or coffee tables or coffee makers.
Speaker:
00:01:24
And then trying to answer the question of like, well, what would
Speaker:
00:01:25
they have to say if they were smart?
Speaker:
00:01:27
It turned out that a little bit too soon, but we didn't have to
Speaker:
00:01:29
wait very long because you know, in 2007, the iPhone came out.
Speaker:
00:01:33
And suddenly everyone started to realize that, oh wait, maybe there's, there
Speaker:
00:01:38
can be this world where a computer is everywhere because now we all have to
Speaker:
00:01:41
started to have them in our pockets.
Speaker:
00:01:42
Right.
Speaker:
00:01:43
And we started to see these, these phones as computers
Speaker:
00:01:45
rather than just to telephones.
Speaker:
00:01:47
And so thing, I'm really struggled to get its concept off the ground,
Speaker:
00:01:50
partly because of technological reasons, partly because of just.
Speaker:
00:01:53
Societal reasons, you know, like it's hard to, it's hard to imagine
Speaker:
00:01:56
these worlds from our research of prototyping, various things.
Speaker:
00:01:59
One of the things that I came up with was the blink, um, the little like
Speaker:
00:02:03
ice squared, C Arduino ad-on that let you control an RGB led very easily,
Speaker:
00:02:07
which back in 2007, 2008 was like a really cool thing because it was hard
Speaker:
00:02:11
to control RGB LEDs with Arduinos, especially going to do more than one.
Speaker:
00:02:15
If you want to do like four or five, it was just like coming up on.
Speaker:
00:02:18
And then that led to the blink one, which is our current it's a USB led that,
Speaker:
00:02:22
uh, that is our current big product.
Speaker:
00:02:23
You know, that's a great
Speaker:
00:02:24
segue.
Speaker:
00:02:24
So you've been around Arduino then since back then, and it sounds like both your
Speaker:
00:02:28
work and your personal life kind of cross with the whole maker community.
Speaker:
00:02:34
What led you into Arduino?
Speaker:
00:02:36
Really?
Speaker:
00:02:36
It was my co-founder.
Speaker:
00:02:37
He, uh, went with thing I'm he knew a lot of the original or Arduino.
Speaker:
00:02:41
Co-founders sorry.
Speaker:
00:02:42
A lot of the original Arabic team.
Speaker:
00:02:44
And we do this yearly conference called sketching and hardware, which at the time
Speaker:
00:02:48
back in 2006, 2007 was trying to imagine what would be the perfect Lego like
Speaker:
00:02:55
system for sketching electronic product.
Speaker:
00:02:58
I can send what you can just sketch on a piece of paper and show it to someone
Speaker:
00:03:01
and they get the idea it's like, is there a similar thing that you can just
Speaker:
00:03:04
like quickly plug together stuff and show it to someone and go, oh, I get,
Speaker:
00:03:07
you're trying to do for this burgeoning world of internet of things and because
Speaker:
00:03:11
computing and we thought at the time with like, oh, Great thinkers together.
Speaker:
00:03:17
We can figure out the one true system that will work for everyone.
Speaker:
00:03:20
And Arduino had just been sort of invented at Ivrea out of the wiring project.
Speaker:
00:03:26
And so we, and so Mike, my co-founder got a bunch of those people in
Speaker:
00:03:29
and got a bunch of the people from academia and from, from industry.
Speaker:
00:03:32
And we all had this like, you know, four day long conference of like,
Speaker:
00:03:35
let's try to figure it out and you know, and we've kept doing that
Speaker:
00:03:38
conference ever since pretty much.
Speaker:
00:03:41
And it turned out, you know, very quickly that there is no.
Speaker:
00:03:44
Perfect Lego like solution for schedule electronic ideas are, do
Speaker:
00:03:47
we know is a really powerful one.
Speaker:
00:03:49
It abstracts away a lot of the, the stupid problems.
Speaker:
00:03:52
Like one of the best things our greener does is it gets you to Blinky.
Speaker:
00:03:56
Like how fast can you go from opening up the box and have little
Speaker:
00:03:59
board to blinking led on that board?
Speaker:
00:04:02
And.
Speaker:
00:04:03
You know, in the nineties, two thousands, you had to install the
Speaker:
00:04:07
well first you had to purchase the integrated development environment
Speaker:
00:04:11
from the vendor and they do install it.
Speaker:
00:04:12
And then you had to like, you know, get the compiler, working at a figure,
Speaker:
00:04:15
all the compiler flags for that chip.
Speaker:
00:04:16
And then the BSP for the board for the chip is on dah, dah, dah.
Speaker:
00:04:20
And so it take you like maybe a week to get just a winking.
Speaker:
00:04:23
And are doing and then Arduino made it so you can get to blinking
Speaker:
00:04:26
Elin led in like five minutes.
Speaker:
00:04:27
Okay.
Speaker:
00:04:28
That's yeah.
Speaker:
00:04:28
A week to five minutes is a good story to have
Speaker:
00:04:31
their focus was more on pedagogy.
Speaker:
00:04:33
Let's figure out how to teach people what to do with these boards once they work.
Speaker:
00:04:38
And so like, okay, let's assume you can read buttons and light
Speaker:
00:04:41
LEDs and make tones on a beeper.
Speaker:
00:04:44
The now what are you doing with that?
Speaker:
00:04:45
And so that was really their focus.
Speaker:
00:04:47
And so they made this very nice, simple.
Speaker:
00:04:50
Since you said of macros and libraries on top of CNC, plus plus for the 80
Speaker:
00:04:55
mega, that was a really good model for how, how one should do sort of
Speaker:
00:05:00
platform independent software design.
Speaker:
00:05:02
And so that's why I sent me that I think that that's one of reasons why we've seen
Speaker:
00:05:05
the explosion of Arduino for everything like any, any board that comes out.
Speaker:
00:05:08
There's usually almost always an Arduino core for it very shortly.
Speaker:
00:05:12
And the other thing that I think that, that made it doing
Speaker:
00:05:14
a successful was it has whole.
Speaker:
00:05:17
Instead of pins where you can plug wires into, whereas all the other boards
Speaker:
00:05:21
before then they had male pin headers.
Speaker:
00:05:24
And so you had to like figure, well, what do I plug onto a male pin header?
Speaker:
00:05:27
You know, whereas everyone, you just know how to stick a
Speaker:
00:05:29
wire into a little tiny hole.
Speaker:
00:05:32
The things
Speaker:
00:05:33
we take for granted, I wasn't doing anything in the maker community,
Speaker:
00:05:36
you know, 10, 15 years ago.
Speaker:
00:05:37
And so to me to hear that could take a week.
Speaker:
00:05:39
I'm like my eyes go wide just to make an led.
Speaker:
00:05:43
You know, much less trying to figure out what the
Speaker:
00:05:45
plugin were.
Speaker:
00:05:46
Totally.
Speaker:
00:05:46
Yeah.
Speaker:
00:05:47
So seeing this explosion and ease of use as someone, me who like
Speaker:
00:05:51
struggled for the week or multiple chips to get it up and running, I was
Speaker:
00:05:54
like, okay, I'm all in an Arduino.
Speaker:
00:05:56
And I really liked Arduino because not only was it easy to use to do
Speaker:
00:05:59
the normal stuff, but because it was just a thin framework on top of.
Speaker:
00:06:04
You could delve into low-level C you could delve into assembly
Speaker:
00:06:07
if you need to do stuff.
Speaker:
00:06:08
And so like, oh, I need to make the signal actually output in the megahertz range.
Speaker:
00:06:13
I can do that with a couple of assembly instructions.
Speaker:
00:06:15
I can't do that in normal C I can't do that Arduino, but that's okay.
Speaker:
00:06:19
I can just make a function that looks to Arduino, like a normal C function,
Speaker:
00:06:22
but then does the magic fast twiddling in assembly are, do we know doesn't
Speaker:
00:06:26
really present you with a flow?
Speaker:
00:06:29
With what to do with a chip, you can just go down as far as you want.
Speaker:
00:06:31
It is presented with a ceiling because it's really hard to do
Speaker:
00:06:34
certain common things that you might want to do with embedded systems.
Speaker:
00:06:38
Like just adding two strings together, like in cat needing two
Speaker:
00:06:41
strings in C and C plus plus is hard.
Speaker:
00:06:43
Even now.
Speaker:
00:06:44
It's still hard.
Speaker:
00:06:45
I mean, it's kinda hard, harder in Arduino C plus plus than it is in normal
Speaker:
00:06:49
C plus plus because normally C plus plus has all these like new fancy classes.
Speaker:
00:06:53
But yes.
Speaker:
00:06:54
Still.
Speaker:
00:06:54
Why is it so hard?
Speaker:
00:06:55
Why, why is memory management so hard?
Speaker:
00:06:57
And it's just like, well, is it, that's just the nature of how it all works.
Speaker:
00:06:59
And so doing anything network-based where you're talking with HTP or ELLs,
Speaker:
00:07:04
getting down texts and parsing texts.
Speaker:
00:07:05
That's pretty hard to do in CNC plus plus Arduino.
Speaker:
00:07:09
And so are doing a very good no floor, but you know, it's got a,
Speaker:
00:07:12
got a hard ceiling to get through.
Speaker:
00:07:14
So one of the things you've been sharing on Twitter lately, as you play with
Speaker:
00:07:17
our Duino is your synthesizer sound.
Speaker:
00:07:20
So you've got a couple of different sense out there.
Speaker:
00:07:22
Where does that?
Speaker:
00:07:23
I come from, I've been doing music stuff since basically the very beginning.
Speaker:
00:07:28
I used some extra scholarship money in college to get my first synthesizer
Speaker:
00:07:32
in sampler and, um, nice back.
Speaker:
00:07:35
Yeah.
Speaker:
00:07:35
Back, you know, in the long ago time.
Speaker:
00:07:36
And so I've been, I've been doing since stuff in various ways in various.
Speaker:
00:07:40
The kinds of things for the very beginning, our mutual friend, John
Speaker:
00:07:44
Park has been doing your rec stuff, a couples for a couple of years.
Speaker:
00:07:48
And so that started me getting into making little Eurorack modules, which
Speaker:
00:07:52
this is one of, this is actually, this runs, this runs on a trinket from Meda
Speaker:
00:07:56
fruit, which also runs circuit Python.
Speaker:
00:07:57
But usually you need to do something or do we know like, or C, C plus plus space to
Speaker:
00:08:02
do actual audio output from these modules?
Speaker:
00:08:04
And so, yes, all of my little modules nowadays, how middle synthesizers
Speaker:
00:08:08
have been looking like this?
Speaker:
00:08:09
Which is a little Joe with a bunch of knobs and it makes noise.
Speaker:
00:08:15
I figured out a picture of that included in the show notes for those
Speaker:
00:08:17
who aren't watching on YouTube.
Speaker:
00:08:20
So tell me about some of the synth projects that you've
Speaker:
00:08:22
been sharing on YouTube.
Speaker:
00:08:23
How do you make those sounds?
Speaker:
00:08:24
How do you combine them?
Speaker:
00:08:25
Ah,
Speaker:
00:08:26
so the cool thing is that there's two really interesting projects out there.
Speaker:
00:08:30
If you're just doing, doing this one is called Mazi.
Speaker:
00:08:32
Mozz I?
Speaker:
00:08:33
And it's been around for about a decade.
Speaker:
00:08:35
Made for the original, the original Arduino, and it is a synthesis library.
Speaker:
00:08:41
So it's got, it's sort of like a little modular synthesizer.
Speaker:
00:08:43
You've got an oscillator object and you've got a filter object.
Speaker:
00:08:46
You've got an envelope object and you connect them together.
Speaker:
00:08:50
You mentioned the same way that you might.
Speaker:
00:08:51
Connect modular synthesizer modules together.
Speaker:
00:08:54
And so one of the, uh, standard signal flow in a synthesizer where
Speaker:
00:08:57
you have an oscillator and that goes to an envelope to control,
Speaker:
00:09:00
like the loudness of the oscillator.
Speaker:
00:09:02
And then that goes to a filter can to control the brightness
Speaker:
00:09:05
or dullness of the sound.
Speaker:
00:09:07
It's like the block.
Speaker:
00:09:08
You'd hear is, is the filter, is the filter being modulating.
Speaker:
00:09:10
And then, and then you might have modulators coming in from the bottom
Speaker:
00:09:13
to modulate, like say the pitch of the oscillator or the cutoff of the filter.
Speaker:
00:09:18
And, um, and so the pitch of the oscillators, how you changed the
Speaker:
00:09:20
notes, you know, and it's really just, you describe a signal flow
Speaker:
00:09:24
and then you describe like how those have the signal is being modulated.
Speaker:
00:09:27
And, um, and it's pretty easy to hook up.
Speaker:
00:09:30
And so I had seen this a long time ago.
Speaker:
00:09:32
Totally ignored it.
Speaker:
00:09:33
A friend of mine online, Emily Valasco, she's been doing some fun little art
Speaker:
00:09:36
projects using Mazi, and I'm like, oh, I wonder if Mazi works on these newer
Speaker:
00:09:40
chips, like the little cutie pie, the ones that are based on the D 21, the arm, arm
Speaker:
00:09:45
processor, and somebody did the work of, of making it work on the San Antonio one.
Speaker:
00:09:50
So I was like, oh, awesome.
Speaker:
00:09:51
I'm going to do that.
Speaker:
00:09:52
Cause, cause you know, for a bang for your buck, a little cutie pie is.
Speaker:
00:09:57
Computer in this little stamp size package and acuity runs how much roughly,
Speaker:
00:10:01
like, I dunno, $8, something like that.
Speaker:
00:10:04
Yeah.
Speaker:
00:10:06
And sometimes you can find them on sale.
Speaker:
00:10:07
And so there they are a really good Arduino platform because they're so
Speaker:
00:10:10
powerful compared to what Arduino is really originally designed to run on.
Speaker:
00:10:14
And so Mazi runs great on this.
Speaker:
00:10:15
You can run like, you know, 32 oscillators and multiple filters and all this
Speaker:
00:10:19
modulation, and I'm not even hit the limit yet, or what's possible using these.
Speaker:
00:10:24
Um, been working towards to scene working to make it break.
Speaker:
00:10:29
That's always the fun part of these projects.
Speaker:
00:10:31
And so you had to fix it.
Speaker:
00:10:32
Yeah.
Speaker:
00:10:32
That's sort of like the lo-fi library is Mazi because it was made for Arduino.
Speaker:
00:10:37
Everything's kind of eight bit, eight bit sound.
Speaker:
00:10:39
Now, if you get into the TNC world, TNC, Baya, By Paul Stauffer
Speaker:
00:10:44
Stauffer's, Stouffer's African how to say his last name, but PJ rc.com.
Speaker:
00:10:48
Uh, they make this great line of boards called TNCs and he made this really great
Speaker:
00:10:53
library called the teensy audio library.
Speaker:
00:10:55
And it's got a gooey web gooey.
Speaker:
00:10:58
We can describe how.
Speaker:
00:11:00
Objects connect in terms of the signal flow.
Speaker:
00:11:02
And that generates a little chunk of Arduino code.
Speaker:
00:11:04
You copy into your sketch.
Speaker:
00:11:06
And then all you have to do is kind of set up all the modulation like, oh, I
Speaker:
00:11:09
want to have the pitch change and I want to have the envelope change or whatever.
Speaker:
00:11:13
And that sound is made to sound like CD quality.
Speaker:
00:11:17
And so I've been playing with on the sort of higher quality and playing
Speaker:
00:11:20
with TNCs and there has been a.
Speaker:
00:11:23
Of the TNC library for the Sam D 51 ships, which are like the, the feather Infowars.
Speaker:
00:11:29
Itsy-bitsy M fours.
Speaker:
00:11:31
And that's pretty good too.
Speaker:
00:11:31
I think the audio quality isn't as good as on the TNC, but I've not
Speaker:
00:11:35
looked into this much because I actually kind of like a low-fi sound.
Speaker:
00:11:38
It's kind of fun.
Speaker:
00:11:38
It's it kind of reminds me of the eighties almost, you know, I
Speaker:
00:11:41
said it's even Twitter.
Speaker:
00:11:42
It takes me back to those John Carpenter movies, like the thing
Speaker:
00:11:45
or any one of his movies that he composed the music for himself,
Speaker:
00:11:49
because that's all he does is since.
Speaker:
00:11:53
Instantly transported to being a kid
Speaker:
00:11:54
again, when the only sounds you can make or 80 style sounds, I've been making 80
Speaker:
00:11:59
style sounds because, because of the fact that like, okay, this is what I can do.
Speaker:
00:12:02
And so that's why once I actually started playing around with the
Speaker:
00:12:04
TNC sophomore, I made ma might make stuff that sounds like it's from
Speaker:
00:12:07
the nineties, maybe that's right.
Speaker:
00:12:12
So I'm just starting guitar samples.
Speaker:
00:12:14
So what does circuit Python need to do to kind of catch up in that sound space?
Speaker:
00:12:19
So I think a lot of what you described
Speaker:
00:12:20
they can't do today.
Speaker:
00:12:21
Yeah.
Speaker:
00:12:22
Not really.
Speaker:
00:12:22
One of the really interesting things is that circuit Python, just out of the
Speaker:
00:12:26
box supports the ability to play a wave file, which if you've ever tried to do
Speaker:
00:12:31
that or do we know it's a real payment, but because they're good, Python has
Speaker:
00:12:34
all this other stuff happening for like, it's got the idea of a file system, you
Speaker:
00:12:38
know, like a directory with files in it.
Speaker:
00:12:40
Right.
Speaker:
00:12:40
It's got the.
Speaker:
00:12:42
Audio driver low-level DMA stuff set up on almost all the chips that have supports.
Speaker:
00:12:48
And so you can just say play WAV file, like, you know, audio.play and give it a
Speaker:
00:12:53
file name and it'll play that wave file.
Speaker:
00:12:56
And that's amazing.
Speaker:
00:12:56
And you can even tell it's a loop, so it'll loop seamlessly.
Speaker:
00:12:59
So if you've got a perfect little rhythm center, And you still have to play.
Speaker:
00:13:03
It'll just keep playing it.
Speaker:
00:13:04
And that's great.
Speaker:
00:13:05
And it's even got an audio mixer object.
Speaker:
00:13:07
So in theory, you could have multiple wave files, you just tell to play and they
Speaker:
00:13:11
can then like over overlap each other.
Speaker:
00:13:13
And so you can kind of create a little, little sample player.
Speaker:
00:13:16
She was saying, I did not know that.
Speaker:
00:13:18
So there's a couple of problems though.
Speaker:
00:13:19
One is that you can't really change the pitch.
Speaker:
00:13:21
Of the samples without changing the sample rate of the entire system.
Speaker:
00:13:26
So basically you can change the pitch of everything, but not, not just one sample.
Speaker:
00:13:30
That could be a challenge and doing, doing pitch shifting is a non-trivial task.
Speaker:
00:13:33
So it's not like, it's not like, oh, I didn't these bozos think of this.
Speaker:
00:13:36
Like, no, no, that's actually a really hard problem.
Speaker:
00:13:38
And, uh, the other thing is the audio mixer seems to not quite work for, in
Speaker:
00:13:43
some of the cases I was using it with.
Speaker:
00:13:45
And so maybe I'm just using it wrong, but I was having a hard time getting the
Speaker:
00:13:48
audio mixer to work with more than one.
Speaker:
00:13:50
And more than one object.
Speaker:
00:13:51
So, but then there's the whole that meshes like sample playback.
Speaker:
00:13:55
If you're doing synthesis, like what I was talking about with Mazi
Speaker:
00:13:58
and with the TNC audio library, that's a whole other can of worms.
Speaker:
00:14:02
It's, it's very similar in that you often create a small buffer.
Speaker:
00:14:06
That's sort of like a sample of the thing is played out and then you
Speaker:
00:14:08
just refill that buffer and just keep playing and playing it out.
Speaker:
00:14:11
There's a whole level of, uh, I don't know what it would say.
Speaker:
00:14:15
Like just objects and a framework for how the data gets
Speaker:
00:14:18
fed regularly into the system.
Speaker:
00:14:21
And the TNC audio library has solved a lot of this, but it solved it in
Speaker:
00:14:24
an Arduino way, which is you can make a lot of stuff, very efficient to
Speaker:
00:14:27
compile time with Arduino that you can't do in circuit Python, because
Speaker:
00:14:31
Python, everything is done at runtime.
Speaker:
00:14:33
Right?
Speaker:
00:14:33
And so there's, I think the TNC audio library and Mazi does a
Speaker:
00:14:37
bunch of stuff where it allocates a bunch of buffers statically, and.
Speaker:
00:14:41
Sets up pointers to them in various ways, statically, so that it's all
Speaker:
00:14:44
very fast and efficient and can operate, you know, maximum rate.
Speaker:
00:14:48
And you just can't do that.
Speaker:
00:14:49
And surrogate Python, because of everything kind of the system doesn't
Speaker:
00:14:52
know what libraries are going to load.
Speaker:
00:14:53
We can say import library name.
Speaker:
00:14:56
And so it has to, it has to be very flexible and that flexibility
Speaker:
00:14:58
comes at a cost of speed.
Speaker:
00:15:00
But I think it's possible if there is an open issue on the circuit Python.
Speaker:
00:15:03
I get hub for adding the TNC audio library.
Speaker:
00:15:06
So if anybody has any thoughts on how to do this, please add to the
Speaker:
00:15:10
discussion there because I'm super, super excited to see it happen.
Speaker:
00:15:13
We'll link to
Speaker:
00:15:14
that in the show notes as well.
Speaker:
00:15:16
So the takeaway there is audio is hard and we need someone to come help.
Speaker:
00:15:20
Yeah.
Speaker:
00:15:20
Get some sense of
Speaker:
00:15:21
good that I think it's within the realm of possibility.
Speaker:
00:15:25
One thing at a time.
Speaker:
00:15:28
Hey, it's Paul, I'll get you back to the show in just a moment.
Speaker:
00:15:31
I wanted to say thank you for listening.
Speaker:
00:15:32
If you liked the show, please hit the subscribe button, write
Speaker:
00:15:35
a review or tell a friend.
Speaker:
00:15:36
You hear that a lot, but it really does help for other ways to help the show.
Speaker:
00:15:39
Visit circuit Python, show.com/support.
Speaker:
00:15:42
Now back to the show.
Speaker:
00:15:44
So you started using circuit Python after all those years of Arduino.
Speaker:
00:15:48
Start to learn Python C Python itself.
Speaker:
00:15:51
How has that, how has that journey been?
Speaker:
00:15:53
Has it been easy to pick up some of the big Python stuff starting with the smaller
Speaker:
00:15:56
building?
Speaker:
00:15:57
Oh, very much.
Speaker:
00:15:58
Yeah.
Speaker:
00:15:58
If you have not learned much Python, I would say just ignore all the other
Speaker:
00:16:03
Python stuff out in the world and try circuit Python first, because.
Speaker:
00:16:07
Python is used for a lot of really big projects.
Speaker:
00:16:11
And there's a lot of like heavy prerequisites that can, that
Speaker:
00:16:15
can be used for doing what are seemingly simple things.
Speaker:
00:16:19
And like, for instance, oh, I want to, like, I want to brighten this.
Speaker:
00:16:23
And suddenly you're installing a num PI this huge numerical analysis package.
Speaker:
00:16:28
And like, no, no, I just want to brighten this image.
Speaker:
00:16:30
You know, it's like, I don't want to like load up this gigabyte library for Python.
Speaker:
00:16:34
And that requires like all these C library.
Speaker:
00:16:36
It's like, it's like, no, no, no.
Speaker:
00:16:37
It's like choose a smarter thing.
Speaker:
00:16:39
Like maybe choose.
Speaker:
00:16:39
I want to build a small robot and I've got two little lights,
Speaker:
00:16:43
sensors, and two little wheels.
Speaker:
00:16:45
And he was like, I, you know, I've been programming C for.
Speaker:
00:16:49
Most of my life.
Speaker:
00:16:50
And I'm a big believer in the curly brace and the idea of not having block
Speaker:
00:16:56
markers like Python, you just indent indicate a block is just, it was,
Speaker:
00:17:00
it just didn't make any sense to me.
Speaker:
00:17:02
I still have a hard time with it sometimes as a way of like Python could do so much.
Speaker:
00:17:06
And circle Python is a really interesting way to think about micro-controllers
Speaker:
00:17:09
because since it's very high level, like it has a much higher floor than Arduino.
Speaker:
00:17:15
Like you start out being able to add strings.
Speaker:
00:17:18
Easily, you start out having a little file system with a bunch
Speaker:
00:17:22
of files that you just read from.
Speaker:
00:17:23
You can store like a Jason file for configuration on the circuit PI
Speaker:
00:17:28
drive, and just load it up and say, okay, how am I supposed to behave?
Speaker:
00:17:31
And you can then write back to that file.
Speaker:
00:17:33
If you want to like, save the state of your program.
Speaker:
00:17:35
Like, these are things that are really hard to do in Arduino.
Speaker:
00:17:38
And there's like, bam, easy.
Speaker:
00:17:39
Like you don't have to think about it.
Speaker:
00:17:40
So it's much
Speaker:
00:17:41
more like using a computer, right?
Speaker:
00:17:43
I'm used to saving a file on my drive.
Speaker:
00:17:45
I can save a secret step by file with.
Speaker:
00:17:47
Wireless ID inside of it.
Speaker:
00:17:49
Exactly that.
Speaker:
00:17:49
And so for doing, but at the same time, it is super constrained.
Speaker:
00:17:53
Like, like you can't do everything, like all the possible things you
Speaker:
00:17:57
want to can do on a computer with Python, you can't do a circuit Python
Speaker:
00:18:01
on most of the circuit on boards.
Speaker:
00:18:02
You can access the internet, you know, you can't draw to a
Speaker:
00:18:05
screen because there's no screen.
Speaker:
00:18:07
And so it's a fun.
Speaker:
00:18:08
Like sort of micro universe of a problems, like, okay, well, I've got the
Speaker:
00:18:12
ability to read buttons and I've got the ability to write to a little led strip.
Speaker:
00:18:17
And just that will teach you a lot about how Python thinks about
Speaker:
00:18:21
data structures and about Python, the things about structuring code.
Speaker:
00:18:25
And so just thinking about the small parts of Python for me was really
Speaker:
00:18:31
helpful because now I feel like I can actually look at the larger project.
Speaker:
00:18:34
In computer Python, desktop Python, and go, oh, I see what they're doing.
Speaker:
00:18:38
Cause, cause like I looked at trying to do a aesthetic website generator
Speaker:
00:18:42
that was using some Python framework.
Speaker:
00:18:44
I was just like, man, this is a lot.
Speaker:
00:18:45
This is assuming a lot of knowledge about how Python thinks that I don't even have.
Speaker:
00:18:50
Cause I don't, I don't know how Python thinks yet.
Speaker:
00:18:52
And in circuit path and kind of helps you think about Python.
Speaker:
00:18:54
Python thinks about itself
Speaker:
00:18:58
built on the backs of giants, right?
Speaker:
00:19:00
Between C Python and micro Python, doing a lot of that heavy lifting
Speaker:
00:19:03
to help get us where we are today with circuit by thought it was just
Speaker:
00:19:05
absolutely.
Speaker:
00:19:06
Yeah, exactly.
Speaker:
00:19:07
And so one of the differences between circuit Python and micro Python, I think
Speaker:
00:19:10
is that Scott with circuit Python has very explicitly tried to make circuit Python.
Speaker:
00:19:16
Work-like and look like and remold, desktop Python, whereas micro Python
Speaker:
00:19:22
is okay with saying, okay, we're going to, we're going to go away
Speaker:
00:19:25
from how desktop Python does things.
Speaker:
00:19:27
Cause it's less efficient because we want to do these
Speaker:
00:19:29
microcontrollers specific things.
Speaker:
00:19:32
And so there's like best suited for ways to different philosophies
Speaker:
00:19:35
of approaching the problem.
Speaker:
00:19:36
And then they're both valid, you know, like I use micro Python
Speaker:
00:19:38
for some things, but if you are looking to learn more about how.
Speaker:
00:19:43
Desktop Python works doing circuit Python.
Speaker:
00:19:45
We'll be, we'll think we'll help you more.
Speaker:
00:19:47
I agree.
Speaker:
00:19:47
And you know, I came late to the party.
Speaker:
00:19:49
I didn't learn how to code until I was well into my forties.
Speaker:
00:19:51
Oh, wow.
Speaker:
00:19:52
And started with Python.
Speaker:
00:19:53
This is, you know, four or five years ago coming to circuit
Speaker:
00:19:56
Python was a little easier.
Speaker:
00:19:58
I, you know, the codes readable.
Speaker:
00:19:59
I understand what it's doing, but whenever I talk to someone and they're
Speaker:
00:20:02
like, How do you know what you want to build or what you want to do?
Speaker:
00:20:05
I think the best part about circuit Python is go to learn that data fruit.com.
Speaker:
00:20:09
And I don't mean to sound like a commercial forum, but there's 2000
Speaker:
00:20:11
guides there.
Speaker:
00:20:13
Wow.
Speaker:
00:20:14
That's awesome.
Speaker:
00:20:14
And if you're one of those people that learns by hands-on doing it.
Speaker:
00:20:18
They've got it all laid out for you.
Speaker:
00:20:19
Here's the parts you need to buy.
Speaker:
00:20:20
Here's what you need to do.
Speaker:
00:20:22
And then go try and hopefully it works.
Speaker:
00:20:24
Yeah.
Speaker:
00:20:24
There's a great amount of learning to be had just by, just by going through
Speaker:
00:20:28
the GitHub for various sort of Python libraries, like be the eight or free
Speaker:
00:20:33
libraries or other libraries, just go like, oh, you know, how come the Neo
Speaker:
00:20:36
pixels look like a list where you, how you can do little like sub scripting of like,
Speaker:
00:20:40
you know, 0 1, 2, 3 to access the zero.
Speaker:
00:20:44
Second led it's like, how is it?
Speaker:
00:20:46
You can do that with an object in Python.
Speaker:
00:20:47
It's like, well, you just look at the Neo pixel library on GitHub and say, oh, there
Speaker:
00:20:51
are these special functions you can do.
Speaker:
00:20:53
And everything is an
Speaker:
00:20:54
object.
Speaker:
00:20:56
It's Python.
Speaker:
00:20:57
Yeah.
Speaker:
00:20:57
Yeah.
Speaker:
00:20:57
No.
Speaker:
00:20:57
And so it's, so it's really, it's really cool.
Speaker:
00:20:59
I was like, oh, like I see a library doing this interesting thing.
Speaker:
00:21:02
How does this library do this?
Speaker:
00:21:03
Everything?
Speaker:
00:21:03
Well, you can just look at the source code and go, oh, I see.
Speaker:
00:21:07
And that's
Speaker:
00:21:07
the beauty of it being.
Speaker:
00:21:08
And, you know, open source and free software is we can keep giving back.
Speaker:
00:21:12
You can learn from it, you can modify it.
Speaker:
00:21:15
You gotta love it.
Speaker:
00:21:15
Yeah.
Speaker:
00:21:16
But I'm gonna say there are some Python things, some sort of Python
Speaker:
00:21:19
things that have totally just kept slipping out of my brain.
Speaker:
00:21:22
And so two years ago, I forget what it was, but I started because I'm a big
Speaker:
00:21:27
fan of these little cutie pie things.
Speaker:
00:21:29
I started a cutie pie tricks, GitHub repo.
Speaker:
00:21:31
That was just a list of things of me.
Speaker:
00:21:34
It was around Halloween.
Speaker:
00:21:35
So a lot of the, a lot of the tricks or how to do Halloween.
Speaker:
00:21:39
Sort of things, but it was a li it was essentially a list for me to remind
Speaker:
00:21:43
myself, oh, how do I control a servo?
Speaker:
00:21:45
How do I read a button?
Speaker:
00:21:47
And then Halloween passed.
Speaker:
00:21:48
And then I decided, you know what, this really should grow into a larger thing.
Speaker:
00:21:52
So I made a circuit Python tricks, repo.
Speaker:
00:21:55
It's just a list of all the same things.
Speaker:
00:21:56
So, so I always go back to that old, like, oh, that's right.
Speaker:
00:21:58
How do I do a D bounced button?
Speaker:
00:22:00
Oh, that's right.
Speaker:
00:22:01
I use this library and I.
Speaker:
00:22:03
Create the button this way.
Speaker:
00:22:04
And how do I fantastic.
Speaker:
00:22:08
I was just looking at your repository.
Speaker:
00:22:10
There's over 50 tips and tricks in there.
Speaker:
00:22:13
There's that many now.
Speaker:
00:22:14
And it's like, I'm mentally marking them down as I'm reading in my head.
Speaker:
00:22:17
Like, I need to make a note of that and that oh, that's how I do that.
Speaker:
00:22:20
So that's awesome that you shared that with everyone.
Speaker:
00:22:22
I mean, you know, I got to write things down as I get a little
Speaker:
00:22:25
bit older, so I totally get where you're coming from, but to take that
Speaker:
00:22:28
extra step and actually share it.
Speaker:
00:22:29
That's fantastic.
Speaker:
00:22:30
In my home directory on my laptop, I have a get dash hints dot TXT, a
Speaker:
00:22:37
image magic dash hens dot TXT image.
Speaker:
00:22:39
Magic is a tool used to do.
Speaker:
00:22:42
Image editing on the command line.
Speaker:
00:22:44
I have all these text files, just like me writing down things that I've typed
Speaker:
00:22:48
into the command line to, or typed inappropriate into in a program languages
Speaker:
00:22:52
to remind me, like, how do you do that?
Speaker:
00:22:54
Like, how do you list all the tags and get, cause I always forget that, you know,
Speaker:
00:22:57
that's my biggest problem.
Speaker:
00:22:59
Right.
Speaker:
00:22:59
And I'm sure other people do this as I've learned to program.
Speaker:
00:23:02
But I go solve my problem and then I don't have to visit it for another six months.
Speaker:
00:23:05
So when I come back six months later, I'm like, I really wrote that code.
Speaker:
00:23:10
So this is a
Speaker:
00:23:11
genius idea.
Speaker:
00:23:12
What is it?
Speaker:
00:23:13
This is why stack overflow is like the most popular website.
Speaker:
00:23:17
All right.
Speaker:
00:23:17
Well,
Speaker:
00:23:18
next up, we have a segment that I call turn the tables.
Speaker:
00:23:20
You know, I mentioned earlier, I'm a big vinyl record fan.
Speaker:
00:23:22
I've been asking all the questions.
Speaker:
00:23:24
Here's your chance to ask me anything.
Speaker:
00:23:26
All right.
Speaker:
00:23:26
This is sort of what I'm going to have a little prologue to this.
Speaker:
00:23:29
Right now as we're recording, this is at the end of January where everyone
Speaker:
00:23:32
in the community, or a lot of people in the community sort of post their public
Speaker:
00:23:36
wants and desires for circuit Python, either, either their personal desires
Speaker:
00:23:39
or like the desires for the language.
Speaker:
00:23:41
And mine was like, let's have an audio engine, like first
Speaker:
00:23:45
of the sizer type stuff.
Speaker:
00:23:47
Do you have any desires for circuit Python in the next year off the top
Speaker:
00:23:51
of my head, I don't.
Speaker:
00:23:53
And the reason being is that I'm still fairly new to the community.
Speaker:
00:23:55
I've been lurking for the last year, maybe a year and a half, but I'm still
Speaker:
00:23:59
getting to know a lot of folks in the podcast is a great way to do it.
Speaker:
00:24:02
You know, I'm not ready to, to jump out there and say, these are the
Speaker:
00:24:05
things I want to see from Python.
Speaker:
00:24:07
I'm excited to give back that I, uh, what I can write starting a podcast and
Speaker:
00:24:11
blogging a little more about my journeys and the things I'm trying to build.
Speaker:
00:24:15
What's a great question, but I'm still at that stage where I'm just.
Speaker:
00:24:18
Soaking it all in trying to figure out okay, who does,
Speaker:
00:24:20
what or where are those gaps?
Speaker:
00:24:22
Cause I don't even know what I don't know right now.
Speaker:
00:24:25
Totally.
Speaker:
00:24:25
Yeah.
Speaker:
00:24:25
That's that's the problem I'll have.
Speaker:
00:24:26
Right.
Speaker:
00:24:27
So besides the podcast, what other circuit Python related
Speaker:
00:24:29
projects are you anticipating for yourself in the coming year?
Speaker:
00:24:33
My PI
Speaker:
00:24:33
portal just arrived yesterday.
Speaker:
00:24:35
So my big project is, is.
Speaker:
00:24:38
So again, I'm a big vinyl record fan, and I'm just going to, you know, like a broken
Speaker:
00:24:42
needle, keep making bad jokes about it.
Speaker:
00:24:44
But, um, so I built a website using fast API and it's a random record generator.
Speaker:
00:24:49
So I've got about, let's say a thousand records.
Speaker:
00:24:52
I hit a button on this website.
Speaker:
00:24:53
It says, Hey, go play this record.
Speaker:
00:24:56
So I get up, I put it on, I come back in my office and my record
Speaker:
00:24:59
players in a separate room.
Speaker:
00:25:00
And I had it, so I could draw an eight bit map on a 64 by 64 led screen of
Speaker:
00:25:06
the cover art of what was playing.
Speaker:
00:25:07
So I'm using MQTT.
Speaker:
00:25:09
It'll send a message that if I'm the one who requests that
Speaker:
00:25:13
the random record push that.
Speaker:
00:25:16
To the PI portal.
Speaker:
00:25:17
Now I'm going to change it out for a pipe so I can get a higher quality image
Speaker:
00:25:20
to see the cover art, or whatever's playing 10 feet and pick up the record.
Speaker:
00:25:25
But it's one of those things, like I mentioned earlier, I learned by
Speaker:
00:25:28
that hands-on and this has got a little bit of everything, right?
Speaker:
00:25:31
There's that, that C Python and, you know, building a website, which is hard.
Speaker:
00:25:36
Too.
Speaker:
00:25:37
I had to build my own MQTT server, which still the servers running.
Speaker:
00:25:41
I haven't figured out how to use it.
Speaker:
00:25:43
One thing at a time, and then learning all the circuit
Speaker:
00:25:46
Python that goes on the boards.
Speaker:
00:25:47
And the, my first couple of tries with the matrix portal, I
Speaker:
00:25:50
was running into memory errors.
Speaker:
00:25:51
So that was fun.
Speaker:
00:25:53
And I literally do mean it was fun.
Speaker:
00:25:55
Learning about memory management and circuit Python and what
Speaker:
00:25:57
the constraints are there.
Speaker:
00:25:59
It wasn't fun that it didn't, it wasn't working when I thought it was.
Speaker:
00:26:01
But yeah, eventually
Speaker:
00:26:03
I got it there to kind of go back to the whole internet of things,
Speaker:
00:26:06
stuff that we kind of started with.
Speaker:
00:26:07
This was one of the biggest problems that I've had with people advocating
Speaker:
00:26:12
the internet of things, stuff.
Speaker:
00:26:13
Is it to be a really good participant on the net nowadays?
Speaker:
00:26:19
You have to have a pretty good.
Speaker:
00:26:21
Networking stack.
Speaker:
00:26:22
Like it's not just, it's not just, oh, I can, I can get an IP address
Speaker:
00:26:26
from the DHCP server and I can make this request like, no, no.
Speaker:
00:26:30
You've also got to do it securely with HTTPS or TLS, whatever.
Speaker:
00:26:34
You've also got to have certificate management.
Speaker:
00:26:36
So for when the certificates get expired or whatever, and.
Speaker:
00:26:40
There has to be a mechanism for updating the system for when
Speaker:
00:26:44
the inevitable problems happen and the underlying libraries.
Speaker:
00:26:46
Cause there's usually like, you know, some crypto library that gets gets bonked.
Speaker:
00:26:49
And so you get to like update that.
Speaker:
00:26:51
And so that's a lot of effort to put into a tiny mark controller
Speaker:
00:26:55
and the fact that circle Python confess your orals at all is amazing.
Speaker:
00:27:00
But it's often frustrating because a lot of the data sources
Speaker:
00:27:04
that are out there assuming.
Speaker:
00:27:05
You have the full weight of a computer behind the thing fetching and it's
Speaker:
00:27:10
like, no, no, I just want to kill it.
Speaker:
00:27:12
Bytes of data.
Speaker:
00:27:13
I don't want this 1.2 megabyte XML or JSON file.
Speaker:
00:27:17
You're giving me, let alone parsing that.
Speaker:
00:27:19
And so like, like a lot of times when you run into, out of memory errors,
Speaker:
00:27:23
when you're doing network fetches with circuit Python, it's probably because the
Speaker:
00:27:27
data feed is just too big for the Ram.
Speaker:
00:27:30
On the chip and it's not really a fault of circuit Python so much as
Speaker:
00:27:34
it's the fault of the fact that we.
Speaker:
00:27:36
We've got, we've got, we've got a sort of, uh, a technical culture of the feeds are
Speaker:
00:27:41
always the biggest feeds possible because we won't include all the information.
Speaker:
00:27:45
And there's no way of including, like asking for summaries or something.
Speaker:
00:27:49
So, like you said, at the beginning, we've taken, you know, in 2007, the iPhone
Speaker:
00:27:53
launched, we take for granted having these super computers in our pocket.
Speaker:
00:27:56
Right.
Speaker:
00:27:56
If I want to pull my phone out and check the scores on ESPN to see what the latest
Speaker:
00:28:00
football game is, they can deliver it.
Speaker:
00:28:02
Jason packet with all the teams scores times.
Speaker:
00:28:05
But if I only want that one little team, yeah, I can absolutely see
Speaker:
00:28:09
how memory being constrained on a microcontroller is very different than
Speaker:
00:28:13
what we want to do with our smartphone.
Speaker:
00:28:15
Yeah.
Speaker:
00:28:15
Like before the iPhone, there was this thing called lap wireless access protocol.
Speaker:
00:28:21
I think I wrote a couple of websites for this and you're fine.
Speaker:
00:28:24
And there, there were phones that had web browsers on them and.
Speaker:
00:28:28
They were a special cut down version.
Speaker:
00:28:31
Like even HTML was too big.
Speaker:
00:28:33
It was a special cutdown version of the tag language of HTML that was minimal.
Speaker:
00:28:38
And you would create a separate little index page instead
Speaker:
00:28:41
of the normal index page.
Speaker:
00:28:43
So you can browse it on your little, like Nokia.
Speaker:
00:28:45
Phone or whatever.
Speaker:
00:28:46
And it's sort of that, like, we need that level of ability to funnel down the data
Speaker:
00:28:51
feeds that are out there that like sort of Python is perfectly capable of fetching,
Speaker:
00:28:55
but it's not capable of fetching it all.
Speaker:
00:28:58
And so, you know, maybe yeah, since we probably can't change the world to
Speaker:
00:29:04
have the ability to have, have succinct data feeds, maybe you like, we could
Speaker:
00:29:08
create some sort of a streaming parser.
Speaker:
00:29:10
Yeah.
Speaker:
00:29:11
Sort of Python or maybe someone interesting like eight or fruit came out
Speaker:
00:29:14
like eight, a fruit IO they're sort of MQTT server thingy has some ability to
Speaker:
00:29:19
do some sort of collapsing of data feeds.
Speaker:
00:29:22
I think for certain, for certain data types, like time or date or something
Speaker:
00:29:25
it does.
Speaker:
00:29:26
And I know on the pipe portal, you can even send it a photo
Speaker:
00:29:29
and I'll send you back the.
Speaker:
00:29:31
And so like, if there was like a more extensive version of that where you
Speaker:
00:29:35
could, I don't even know how you, how one would configure it, be give it a
Speaker:
00:29:37
big data feed URL, and it would, and you can tell it which parts you wanted.
Speaker:
00:29:41
Like, oh, I only want the artist and title or something, like build
Speaker:
00:29:44
your own API out of the feed.
Speaker:
00:29:46
Yeah, exactly.
Speaker:
00:29:47
Todd, last question for you that I like to ask each guest, you're
Speaker:
00:29:50
starting a new project or prototype you reach for a microcontroller.
Speaker:
00:29:53
Which one is it?
Speaker:
00:29:54
Uh, so I think in the world of circuit Python, it might be useful to ask
Speaker:
00:30:00
what boards should I not start on?
Speaker:
00:30:02
One of the sort of like super starter boards was the surrogate Python express.
Speaker:
00:30:07
It's got the Sam D 21 chip on it and, uh, has a, um, a flat and
Speaker:
00:30:11
extra flash chip from our memory.
Speaker:
00:30:13
That's the one I started with.
Speaker:
00:30:14
Yeah.
Speaker:
00:30:14
And so.
Speaker:
00:30:15
Early sorta Python and then Arduino.
Speaker:
00:30:17
This is an amazing, powerful chip, but as circuit Python has grown up, its memory
Speaker:
00:30:21
requirements have, have grown a bit.
Speaker:
00:30:24
And also the things we want to do with circuit Python has grown.
Speaker:
00:30:27
And so you start to run into lack of Ram problems pretty quickly on this.
Speaker:
00:30:32
Board because of the chip that's on it.
Speaker:
00:30:34
And so I normally SU people away from the Sam D 21 based boards, like the
Speaker:
00:30:38
certified circuit playground express.
Speaker:
00:30:40
And so now, uh, and also because of the global component shortage, the
Speaker:
00:30:44
global electronic component shortage we've had for the last couple of
Speaker:
00:30:47
years, getting the chip that's.
Speaker:
00:30:49
This end and somewhere ones has been hard.
Speaker:
00:30:52
And so that's why you've seen a lot of RP, 20, 40 based boards, and a
Speaker:
00:30:55
lot of ESP 32 based boards, because those two manufacturers have had
Speaker:
00:30:59
a different, a different resource allocation budget or something.
Speaker:
00:31:02
So they, so they actually have, have chips available.
Speaker:
00:31:05
And, um, and so I would say, so it is, uh, the NC Bisi line
Speaker:
00:31:10
from, from eight of fruit.
Speaker:
00:31:12
It's not a lot of love, uh, because the there's the.
Speaker:
00:31:15
Powerful feather format.
Speaker:
00:31:17
That's basically the same thing, but a little bit bigger.
Speaker:
00:31:19
It has like battery circuitry.
Speaker:
00:31:20
This has no battery circuitry, but this also has a level shifter up to five volts
Speaker:
00:31:25
on one of the pins for driving Neo pixels.
Speaker:
00:31:28
So if you're into LEDs, this is a good one to get three
Speaker:
00:31:31
to five volts can make a big difference.
Speaker:
00:31:35
A lot of Neo pixels strips will work just fine when you feed them with
Speaker:
00:31:38
a three volt data line, but a lot don't they get like weird flicker in.
Speaker:
00:31:41
So like, Hey, just avoid the problem.
Speaker:
00:31:43
Get the level shift built on.
Speaker:
00:31:46
So that's, if you want to like start if you're like an Arduino, so like a
Speaker:
00:31:48
fairly experienced Arduino person and you're used to breadboards and all this
Speaker:
00:31:51
kind of stuff, and you're used to, you used to be doing like little, you know,
Speaker:
00:31:55
jumper wires and things like that.
Speaker:
00:31:57
Then it's C I think is one of the best deals.
Speaker:
00:31:59
It's like pretty cheap, cheaper than the feather.
Speaker:
00:32:01
Cause it doesn't have all the battery handled or circuitry.
Speaker:
00:32:03
And of course, you know, our, do we know what certified on if you're
Speaker:
00:32:06
not, not in like a, uh, uh, coming from Arduino and you're kind of
Speaker:
00:32:10
coming to circuit Python from.
Speaker:
00:32:14
The computer world and you probably want to be doing a lot of networky stuff.
Speaker:
00:32:18
So I'd say use a board, this based off of the ESP 32 S two chip, which is a
Speaker:
00:32:23
wifi chip that can run circle Python.
Speaker:
00:32:25
And one of the best boards I've found for this is the eight fruit fund house,
Speaker:
00:32:29
which has a really great, like high Rez, two 40 by two 40 LCD screen on it.
Speaker:
00:32:35
And it's got a couple of buttons and it's got.
Speaker:
00:32:38
Cap sense, touch sensors.
Speaker:
00:32:39
And it's got a little, a thing up here for a motion detector and it's got
Speaker:
00:32:43
a beeper on it and a bunch of like, you know, IO connectors on the side.
Speaker:
00:32:46
And I came with a little plate.
Speaker:
00:32:48
So laser cut plates, you can like, hang it on a wall, but it's super handy
Speaker:
00:32:52
because like, you know, when you're doing wifi stuff, having a screen to
Speaker:
00:32:56
tell you what the heck is going on.
Speaker:
00:32:58
Can it find the wifi?
Speaker:
00:32:59
Is it connected to wifi?
Speaker:
00:33:01
Can it find the server it's trying to, to there's all these ways
Speaker:
00:33:04
that network devices can go bad.
Speaker:
00:33:06
And so having a screen can be real easy because circle Python will automatically
Speaker:
00:33:11
use a display as its display outputs.
Speaker:
00:33:14
Like even when an error happens, when it like airs out and crashes, it'll
Speaker:
00:33:17
print the error message on the screen.
Speaker:
00:33:19
So that's, that's super handy.
Speaker:
00:33:20
If you want something a little cheaper, there's a really
Speaker:
00:33:22
great board using the same.
Speaker:
00:33:25
From a company called Lily go they're available on AliExpress.
Speaker:
00:33:28
And the cool thing about this is you can see it's got a little SD
Speaker:
00:33:31
card holder on the back, so you can actually have put more memory on it.
Speaker:
00:33:36
So you can store like a whole bunch of data.
Speaker:
00:33:38
Like if you're pulling data down from the internet or.
Speaker:
00:33:40
Pushing data up on whatever it's only got.
Speaker:
00:33:43
I think it's got one button that's usable by the user on the
Speaker:
00:33:45
front, which isn't that cool.
Speaker:
00:33:47
But the display is really crisp and clean and fast.
Speaker:
00:33:50
Also the antenna on this is a bit better, I think, than what's on the Funhouse.
Speaker:
00:33:54
So I think it seems to get a little, a little bit longer range.
Speaker:
00:33:57
It's not as fast to get like the.
Speaker:
00:33:59
You can get it from like Digi-Key or ate a fruit.
Speaker:
00:34:02
And they'll just like, you know, there'll be there in a couple of days.
Speaker:
00:34:03
Ali express could be a month.
Speaker:
00:34:06
Yeah, exactly.
Speaker:
00:34:07
And the other nice thing is that if you're getting started with like
Speaker:
00:34:08
a Python and you want to play with a bunch of the interesting sensors
Speaker:
00:34:11
based off of the stomach UT protocol, it's got a stomach UT Jack's you
Speaker:
00:34:16
can just start plugging connectors.
Speaker:
00:34:18
Sorry.
Speaker:
00:34:18
Play.
Speaker:
00:34:19
Plugging sensors in.
Speaker:
00:34:21
And, um, and so that's kinda my two, my two forks in the road is
Speaker:
00:34:25
like, are you an Arduino person?
Speaker:
00:34:26
When you're closer to Python, then use the Etsy.
Speaker:
00:34:30
And if you're a kind of Python person wouldn't to get into circuit Python,
Speaker:
00:34:33
then get something like the fun house.
Speaker:
00:34:36
Oh, those are great
Speaker:
00:34:36
picks.
Speaker:
00:34:37
I'll make sure that I linked them in the show notes to see us through the podcast.
Speaker:
00:34:41
I'll give you links to all these, if you need them.
Speaker:
00:34:44
Awesome.
Speaker:
00:34:44
Perfect.
Speaker:
00:34:45
Well, thanks again for being on the show.
Speaker:
00:34:46
Thanks
Speaker:
00:34:47
man.
Speaker:
00:34:48
Thank you for listening to the circuit Python show.
Speaker:
00:34:50
This was episode four with guest Todd Kurt recorded February 1st, 2022.
Speaker:
00:34:56
Thank you for listening to the circuit Python show an independent
Speaker:
00:34:59
podcast with the people in and around circuit Python for show notes,
Speaker:
00:35:03
transcripts, and to support the show.
Speaker:
00:35:04
Visit circuit Python, show.com.
Speaker:
00:35:07
I'm your host, Paul Cutler, and I'll be back next episode.
Speaker:
00:35:10
Don't forget to hit subscribe and stay safe.