Embedded - 397: Owl
Episode Date: December 31, 2021Chris and Elecia ring in the new year with a discussion of projects, hobbies, origami, DMA, music, and the new-and-improved Embedded.fm newsletter... Pepto Bismol can be converted to metal bismuth (Yo...uTube) which can be turned into lovely sculptures. Chris liked his new book, Art of NASA: The Illustrations That Sold the Missions by Piers Bizony. Elecia liked hers, Curved Origami: Unlocking the Secrets of Curved Folding in Easy Steps by Ekaterina Lukasheva Guitar Fart Pedal (Kickstarter) Elecia’s Making Embedded Systems course will have a second cohort starting in March 2022. Sign up for the newsletter if you want an announcement (at the bottom of the Embedded.fm Subscribe page).
Transcript
Discussion (0)
Welcome to Embedded.
I am Elysia White, here with Christopher White.
Happy New Year.
It's not quite.
Almost.
A whole day left.
For us, not for them.
Why? They're going to get it today.
They may not listen to it immediately.
Why would they not listen to it immediately? Welcome to the world's most for them. Why? They're going to get it today. They may not listen to it immediately. Why would they not listen to it immediately?
Welcome to the world's most boring podcast.
Hey, I'm phoning it in today.
I'm just going to say up front.
I'm literally phoning it in.
I'm going to call in from my phone.
I can't make that work.
How are you?
I'm sleepy.
Yes.
I assume that's my fault.
I don't know.
I had strange dreams.
I had a dream that involved mixing up the book I'm reading, Halo the video game, and Star Wars.
And at some point, a badly CGI'd Han Solo appeared in whatever dream I was watching.
And I was commenting on how bad the CGI was for de-aging Han Solo.
That was my dream.
Well, I actually have lots of things to talk about.
Other than my dreams?
I mean, we can stay on that topic.
As everyone knows, listening to people describe their dreams is the most exciting thing.
Yes.
Let's move on to your topics. I think they're better.
Okay.
I have been talking about autonomous off-road trucks for two years now?
More? I mean, you've been working on it.
I don't know that you've talked about it all that much on here.
I've talked a little bit about it because it's for a client, so I can't say everything.
Sure.
But it's self-driving trucks, and
they are off-road. So, you know, roads are
for wimps. And that makes it all a little bit more exciting.
I've gotten to learn a lot of machine learning,
mostly programmed in Python. But I was, I got, I joined
the team because I could put all of the hardware together.
And I did.
And then the team kind of wandered off to other things
and I kind of got to play with whatever I wanted.
And it turned out,
while they went off to do other things,
I made the system do reinforcement learning
instead of regular learning
because it sounded like more fun.
Did they ask you to do that or you just went off and did that yourself?
It was the next logical step in their plan.
Gotcha.
And since I had finished their plan, I was like, well, heck, I can do that.
So, and you stop me if I'm revealing any important secrets, but the way it was learning before was primarily visual.
It was all visual.
It's all visual.
It's all visual.
But it was doing things, one, based on having been trained.
Like you'd get all the video data and then you'd train this neural network to learn to drive or to learn to drive however it's doing it on a big computer later.
And then you'd stick it back on the truck and see how it did.
And the idea was that they would do that every night
and they would partially retrain every night.
And that was one of the differences between that
and it being a true DNN with no...
Supervision.
No supervision, no particular features.
It was all just camera stuff.
And so what you were talking about with what's called reinforcement learning, which you might want to describe,
is taking that process and making it continuous while it's actually being driven by a human.
And they can just take their hands off the wheel and it continues to learn after that point.
Is that kind of the highest level description?
It learns while it does its own driving?
It learns while it's doing its own thing.
And when it makes mistakes, that actually gives it more data to learn from.
And then the reinforcement part is you bill the car for the damage.
No.
And so it learns not to do that.
No, the reinforcement learning is having it learn all the time.
And since this is really a backup system, a safety system,
the fact that it can learn all the time is pretty easy because we usually know what the right answer is. It's only in certain environments
where everything has gone horribly wrong that you need our system.
Okay.
And it means that the system can adapt much better to different environments.
As a safety system that only needs to run for, you know, 10 or 20 minutes at a time,
it's great.
So you did that?
So I did that, and it's done.
The project is done.
It actually, you know, with COVID, we didn't get to do all the field tests.
And I figured we'd have to finish on the simulator, and the simulator's not great.
But we did actually, well, we i i didn't travel um
my my boss manager uh went out your client my client yes he's not your manager or your boss
um went out and put it on trucks and went around and it the first day it didn't work because it's a robot operating system system and
those always have tweaks and because it's a large system with lots of people playing in it
the second day it worked but it didn't really work all as it should it worked about as well
as it did on the simulator.
But that meant the client and I actually spent a lot of time that night trying to get it to work
and we realized that we'd had a communication problem the whole time.
It was boats the whole time. No, no.
It had to do with colors. Colors.
And once we fixed that, the next day it worked stunningly well.
It worked so well that I went back at the data and made sure that I could reproduce it.
Because I was like, what if we didn't do it right?
But no, it really, really did work that well.
And now that the colors are fixed on the simulator it works really stunningly well
this is the classic problem of that happens to a lot of people when they're doing machine learning
classes or projects is rgb and bgr it's it's a it's a bite swapping thing and and you really
reading versus writing you really can't tell there's a problem unless you pull up the image data at various stages.
When we were in TensorFlow, which I don't speak very well.
Yeah, you can do it.
It's just not fun.
I knew it was possible, but I thought we had tried it already in the project.
I'm sure we tried it in the project.
But then you can still convince yourself it's right because you're like, well, this looks weird to me, but everything was trained on this.
So it must be right.
It's very confusing.
You have to keep track of everything at every stage and make sure you know it.
It's like a USB plug.
It's always going to be the other way.
It's always going to be the other way.
So the final report for that goes out January 7th.
And I have, I don't know, 15 hours more of work to do packaging the software up so other people can use it.
And it's, I mean, I guess I'm a little tired too, because this is super exciting to actually have it work.
I mean, all this time I wasn't really sure that it would.
And then when it gets on the trucks, it...
It only has to work once.
The report's written.
It can stop working on January 8th.
No, no. No, now that it works, I want to see it do a lot more.
We'll see if the contract for my client is extended. And then the other thing I have going on is I've been working on an underwater deep sea science platform. And that's done.
I billed the last invoice and finished the documentation,
and I have a couple of questions that I answered today,
but it's done.
And those are my two big clients.
All right.
Well, then, time to retire.
Well, I'm taking
January off,
except for
the other thing I'm doing.
January minus a week.
Well, that's true.
January 7th
is when the report
gets finished.
And off means
you're just teaching
your class.
Right.
I just want to
establish what
off means to you,
Alicia.
Off means I have
one job,
not four.
That'll be so nice. I'm so burnt out. Sometimes my brain is just like, no. No, you may not have
any more neurons today. It's over. We're tired. And it's like, I know I did this to myself.
How do you think brains work? Do you think there's a conveyor belt with neurons that dumps
them into a fire and the burning of the neurons contributes
to thinking? Yes, that's exactly
And then when you run out of neurons, it just doesn't work anymore
and you have to grow some more
in like a... Fat?
I was going to say a forest
Alright. But earwax works
too
I got a
new origami book that I'm super
excited about. It's a curved crease origami book and it's
got some math in it and it's less, here are some pretty patterns, here's a little bit of theory
and more, here's a lot of theory and a few pretty patterns. And I am totally excited, except I got it in early December, and several times I've picked it up wanting to really investigate some stuff.
And my brain's just like, no.
And I had one weekend that was relatively light on work, and I actually got through some.
Christmas weekend.
It wasn't Christmas weekend.
Yeah.
Because you didn't have to teach a class that morning.
Right. So I'm
looking forward to that.
There's going to be a
probably a Matt Plotlib
adventure in
differential geometry? Algebraic geometry?
No, no, he told me what it was. Topology?
Here, I'll read it. It would be closer to geometric group theory differential geometry algebraic geometry no no he told me what it was topology uh here here i'll
read it it would be closer to geometric group theory slash topology slash geometry in low
dimensions algebraic geometry is a different field which treats curves as ideals and rings
which of course i know precisely what that means as everyone does yeah anyway we're getting beyond
geometry into other things ideals and rings is when you have the onion ring and you get just the right amount of mustard and just the right amount of ketchup.
I have no idea what ideals and rings are.
Further, you can quotient the plane by hexagons and you get a torus if done right.
So I'll leave you to discuss that with him.
Maybe I need to talk directly to your brother?
I don't think doing postgraduate level math via text messages is all that easy.
But you enjoy that.
Well, I would if I had, you know, a little bit more time.
So, in January, yes.
And there'll be some pretty weird origami. You should do some YouTube videos.
On what? Origami
and whatever that kind of math is.
That would require me to
understand it. Nah. Have you seen
some of these YouTube videos? I saw a guy who spent
a half an hour trying to make bismuth crystals
and he had a whole
chemistry lab, but it was clear he had encountered it
maybe once before, the lab part.
Was this the Pepto-Bismol? Yeah.
Yeah, he took $120
worth of Pepto-Bismol,
which he bought generic
so it would be cheaper,
and turned it into a crystal about the size of your thumbnail
after nearly
blowing up his house, it seemed.
Well, now you're
starting to make this video sound good.
I'll put it in the link.
I don't want to be too hard on the guy.
But he does play fast and loose with safety.
And he mentions he did a bunch of dangerous stuff.
He was doing stuff like torching beakers, like, directly.
And it seemed like a bunch of stuff that should have been done in crucibles.
And it was melting into the glass.
And it was like, this is not how you're supposed to be doing stuff.
But anyway. Yeah, no, it was really interesting i didn't uh bismuth is an interesting material the only reason i think of wow we're off topic immediately uh it's a metal
uh and it's an interesting metal and it um it it's very expensive it's like seven or ten times
more rare than silver so it's pretty expensive, even though they put it in Pepto.
They don't put a lot in Pepto.
And you can crystallize it.
And when you make the crystals, they're really pretty because when it oxidizes, it does a really neat thin film effect with the oxidation layer that gives you a rainbow effect so there's actually a store the guy pointed to on his youtube video where somebody who
has like made this into a profession makes these large sculptures out of bismuth
he can control probably not pepto-bismol no i think he sources it in a much more efficient way
but he can control the oxidation so they can be any either rainbow or he can choose the color and
but they're very expensive pieces they're like several hundred dollars a piece.
And we think of it as Pepto-Bismol.
How can that be expensive?
But anyway, that is not a topic for today.
I don't know.
Bismuth is a weird metal.
Yeah.
What is it useful for?
Other than Pepto?
Yeah.
I don't know.
All right.
Sorry.
What is a looper?
Oh, a looper?
It's not the movie with Bruce Willis and the guy from Third Rock from the Sun.
Why are you asking?
Because I heard you got one.
No, I didn't.
I didn't.
I was going to.
So, this is a music thing.
Everyone who doesn't hear music can tune out.
They have these things called loop pedals for guitar and other stuff.
And basically the short description is...
Wait, wait, wait.
I have to stop there because you said pedals for guitars.
Yeah.
Christopher also showed me a fart pedal for a guitar.
I didn't show it to you.
I described it.
And I so want to get one and rebrand it and send it to someone.
Yeah.
And then ask them how they like their guitar pedal.
But I have a limited number of people.
Are you keeping track of these links?
Bismuth, fart pedal.
Okay, okay.
Looper guitar pedal.
Looper.
The short description is it will record a short segment as you play.
And then it will start
playing it back.
And then you can
record on top of that.
And so you can
improvise these layers
of a song,
and they continue to play.
So you can play a whole
chord progression, say,
and then just let that go,
and then you can solo
over to practice.
Or you can
layer chords
and some percussion and some other things, and you've got
a whole song piece that you can kind of improvise over. And you can save that, and you can piece
songs together this way. A lot of people do it live. People who are busking or playing in small
clubs will often be like a one-man band with just a loop box. And they'll start building up a song
as they go, and then it's this rich kind of
thing once they've got several going uh so i got a gift certificate for sweetwater which is a music
store and i didn't know what to do with it i've been thinking about loop pedals for a while for
playing with synths and guitar and even doing some drum stuff but um they were pretty expensive
and i kind of decided on one but the pedals themselves have limitations and I realized there must be some stuff
for like the iPad that does this.
And I looked and there were several really nice apps that had more features
than the pedals that costs like $5.
Ouch.
Um,
instead of several hundreds,
like the,
the really,
really full featured loop pedals are like six or $700 and you can get an okay
one for a hundred to 200 uh anyway so uh
i said well i i could just use that but then i don't have the pedal part it's really hard to
start and stop recording of a loop switch to a next you know if there's multiple loops you can
have multiple loops going and you can switch to them and start them recording so to arm recording or turn off things you need to interact with the the app which is
you know if it's an ipad it's touch but you kind of need your hands you're playing guitar
especially if something's running in real time like a loop thing so you can't really you know
if you want to do something in time like start recording a loop you can't push the button and
then oh when you showed it to me you were pushing the buttons with your hands and it didn't
look natural.
Right, right.
So you need a foot switch.
And I realized, well, there was that project I was going to build on the nucleo board.
I think I talked about it early last year, maybe.
I don't know when I started it, but I abandoned it.
And the idea was to have a foot pedal that could just be configured to arbitrarily send MIDI messages,
which is Musical Instrument Digital Interface,
which is a serial protocol to control all kinds of musical equipment,
but also software.
I was going to have a foot pedal with a bunch of buttons
that I could configure to send those messages,
so I could control anything and configure it. And so I said, somebody's got to have built that.
All right. So I went and looked around and there were several available already.
And I found a really cool one that has little screens for every button, has six buttons.
It's completely configurable by an app. I can hook it into the iPad via Bluetooth so I don't
have to plug it in. And then I can push the buttons and it talks to the looper app on the iPad.
And I've got a more than full-featured loop pedal system than if I bought a standalone.
Plus, it's upgradable, because I can just switch out the app for a different app or get the next version.
And it costs me less than a really good loop pedal.
So that's kind of the description of the whole loop saga.
Is that your favorite Christmas present?
No.
You sound so offended.
My favorite Christmas present is not going to be one I bought myself.
Mental note.
Don't tell him that my favorite Christmas present is the curved origami book.
I bought myself.
Okay,
go ahead.
What was your favorite Christmas present?
You know, I think the NASA art book has or to other approval bodies or to the public.
So it was really a history from the beginning of all the different ships and lunar landers and stuff.
And this isn't like engineering drawings.
This is like paintings of what they think the stuff will look like.
But some of them were based on engineering drawings.
Yeah, and some of them were way out there.
There were some for the space shuttle that were like,
there was one for a space shuttle that was from 1964
that was, it looked like the hangar scene from Star Wars.
So somebody had seen that when they were doing designs
for the first Star Wars. So somebody had seen that when they were doing designs for the first Star Wars movie.
And it even had spherical
space stations out
in past, you know,
outside the hangar opening, and
they had a big delta wing. Anyway.
So there's some fanciful stuff
in there too, but a lot of it's pretty interesting.
Yeah.
I keep meaning to sit down and
thoroughly go through that.
Yeah, we both got good books.
Let's see.
Oh, I have a note here to tell people about the newsletter,
where formerly we had a newsletter that was basically a hacked together RSS feed
that went occasionally and often didn't work at all.
We now have a proper newsletter that tells what's happening, what happened last week, what happens next week, maybe a couple of quotes, maybe a couple of off-topic entertaining anecdotes. So if you would like to sign up for the newsletter and know what shows have happened recently,
what transcripts are available,
or what shows are going to happen,
it's on our website.
Yeah.
And we're starting small.
We're kind of adding to it.
Yes, we're adding.
I actually have expansion plans.
But at this point, I'm still just trying to make sure it goes every week.
Our website is terrible, and I cannot see where to subscribe to this.
It should be under subscribe.
It is, but it's at the very bottom.
And on mine, it doesn't render that part until you scroll down.
So we might want to bubble that up to somewhere useful, more useful.
Put it on top or something.
But if you go to embedded.fm, embedded.fm slash subscribe, that is the place to sign up.
It's free.
Oh, yeah, it's totally free.
People have to pay for newsletters now.
I don't understand if you would like
to support the show
you can go to
patreon
slash
embedded
or embedded fm
or something
it's slash embedded
slash embedded
and
you can
sign up there
and join our
join our slack
if you want to
but you don't have to
you can but you don't have to you can but you can job board is there and people talk and it's really cool okay what's next
uh class i guess all right what's going on with class you're teaching this class
you're about the halfway point we are at the halfway point. Halfway point. We're starting to get into final projects. So today I was trying to write down what their final project should be and how it would be graded.
But it's a general, they can choose what they want to do.
It's just how you're going to, the elements it has to have and how you're going to kind of grade it.
Yeah.
It's not, you have to go build a submarine.
No, no, no no no that's been one of the things that i wasn't sure about with the class was giving such a wide open free range option for the final
project but that's actually turned out to be pretty cool because the students learn more from each
other than they do for me sometimes uh, they have to turn in a video
and a write-up report and some code,
and the idea is the final project
will be something they can take to a job interview.
Okay.
So it doesn't even have to be polished or fully working.
No, I want it to be something they've thought about
and that they can talk about.
And it doesn't have to be perfect.
It isn't a product.
It's a job interview.
Yeah, okay.
So, you know, it's like, do you grade them on completeness or on clarity?
Does it matter if their code is super spiffy?
I don't really care if their video is super spiffy.
I just want that to make sure that the system works.
I'm not going to read the code enough to figure out if it works.
Anyway, that's what I've been working on this week.
But next week I have to do Chapter 7.
What's Chapter 7? Is that bankruptcy?
No.
It's uploading code.
It's my least favorite chapter in the whole book.
Get Push Main. Get Push Origin Main and type your credentials. It's uploading code. It's my least favorite chapter in the whole book. Oh, you just get push main.
Get push origin main.
You type your credentials.
What?
To upload code.
Yeah.
Anyway.
What do you, what do you, so this is.
Chapter seven is about bootloaders.
Bootloaders.
I used to say download code.
Download code. Yeah. Upload code. It doesn't matter. Over the air updates. Putting the thing. Bootloaders. I usually say download code. Download code.
Yeah.
Upload code.
It doesn't matter.
Over-the-air updates.
Putting the thing...
FWAP.
Taking the bits
and putting the bits
in the bops.
But the thing is,
this is my least favorite chapter
in the book
because
it doesn't go over
the right things.
If you have a bootloader,
it implies so much else about your system.
Being able to update code
means you have an Internet of Things sort of system.
It means you have a certain kind of flash,
maybe a certain flash with capabilities to store and...
Well, the book kind of goes over that.
Okay.
It's more, well, if you can update code,
you probably need to be talking about heartbeats
and logging remotely
and how to deal with millions of systems
and distributed systems and Internet of Things.
Do you really have millions of systems, though?
Because I have lots of things that are
probably hundreds or thousands volumes that can do that.
My MIDI, my stupid MIDI pedal.
I doubt they've sold more than a couple thousands of those.
And it does firmware update.
But they do need to know which units have firmware updated
and if there are any problems attributable to a certain version.
I think that's something that's very desirable and people should do.
I still think there's a lot of companies that aren't doing that.
It should be something that was in the book.
Okay.
And then the other part of that was security.
That was like touched on the book,
like don't forget.
But for the lecture,
I can't decide whether,
I don't really want to talk about uploading code
because for the most part,
I don't talk about whatever the book has.
I try to extend it somehow. And I can't decide whether to talk about uploading code because for the most part I don't talk about whatever the book has. I try to extend it somehow.
And I can't
decide whether to talk about IoT management
or security.
On one hand I want to talk about security
and all the easy things you can and should do.
On the other
hand I kind of think IoT management is
something that's more useful going forward.
So
do you think Chapter 7 was lacking because it was 10 years ago now
and things have become a little more sophisticated in that realm?
I mean, in 2011, I wasn't thinking a lot about IoT management,
even at places that should have been thinking about it.
I mean, I'd been at ShotSpotter,
so I already had experience with trying to manage large systems with limited data and limited communication.
And we'd done a code update, and so...
But it still was kind of rare.
Oh, yeah. No, it was kind of rare. I mean, the nice thing is some of the IoT management stuff is now packaged.
There's places that do it.
So you could say, here are several places to go and learn about this.
Here's what it does.
Spend two slides on that and then talk more about security.
I don't think you should not talk about either one at all.
So I should just go ahead and do a grab bag
instead of trying to focus on something?
Yeah, but I think you can gloss over the IoT management part
just to say what it means
and some places to learn more and where that would be provided.
Because you can't really do it on your own.
If you're going to get to that point,
your students are going to be in a company with a lot
of people that are choosing a platform with which to do that. They're not going to build it
themselves. So the meaning of that is more important than the how you do this,
because the how you do this is going to depend on what they end up choosing.
Am I making sense? I wouldn't spend a lecture teaching how to do IoT management,
because the answer to that is quicksand.
And changing.
That's what I meant.
Well, both the, you can get lost in it,
and whatever I say will be out of date in six months,
because it's a landscape that's changing quickly.
Whereas security, there's several bedrock concepts.
I just, I mean, I want to talk about WL and static checkers and what it means when your stack overflows.
Like, what does that actually mean?
So you just, okay.
So that's even further down than I was thinking.
I was thinking, like, when you were talking about firmware update,
I was thinking, well, digital signatures and certificates and stuff.
Oh, I think that's in the book.
Or I'll cover that at least a little bit.
But that's back to, for the most part,
you do whatever your vendor tells you to do.
Because that's a separate, the things you're talking about
seem like a separate topic from uploading code.
Well, the W-all and the static checkers and the security understanding buffer overflows,
those all fall into hacking code.
How code gets hacked.
How code goes from a distributed network to a botnet.
And I do associate that with firmware update.
Because it's one of those areas that it's easy to hack somebody's code if you can do a firmware update.
Okay.
I mean, it's not limited to that.
There are exploits that don't require them to replace the firmware on things.
No, but it's good to understand how those things are related.
Sure, yeah.
And that there are top 10 security checklists,
and they're for designing and for coding,
and you should pay attention to them.
And that's where the cryptographic and digital signature stuff comes in
because if you're doing proper checking
and somebody modifies the firmware,
you can flag that.
Yeah, and you should use your hardware for that
as best you can.
Okay, so you think I should just do everything?
This is why my lectures keep getting longer and longer.
But I think you spent, I think,
five minutes on IoT management is more than enough.
Just define it.
Say what parts there are.
Say what it can do for you.
Say where you can learn more and who provides that kind of service.
And then you're out.
Yeah, it looks like I have a slide that's just a list of vendors at this point.
Okay.
So that's class for next week.
And class for last week and class for last week.
Oh, DMA.
Hmm.
Did you like what I did with DMA?
I made you read it like five times.
It was good.
It was good.
It's a, it's a very difficult topic.
Um, I think it may be the, one of the most intimidating things, at least it's for me was one of the most intimidating things, at least for me, was one of the most intimidating things
to kind of learn about.
And I'd known what it was for a long time
because I think on IBM PCs,
you had to mess with it for certain expansion cards.
Sometimes there was some DMA thing in the BIOS.
Anyway, I don't remember if the Apple II had any DMA.
I don't think it did.
That would be way before DMA was a common thing.
Well, then DMA on computers and DMA in microcontrollers is a bit different.
I mean, it isn't really, but the way it's used is often different.
I don't really think so. Like when I was doing it for one job,
it was setting up descriptors and saying,
talking to a data acquisition board,
just a high-speed DAC or ADC.
It was very similar.
I mean, they had an API that made it a little bit easier,
but it was still, here's some buffers,
tell me when you're done,
which is pretty much what DMA is. Here's some buffers and tell me when you're done. Which is pretty much what DMA is, here's some buffers and tell me when you're done.
No, I liked your stuff, and I think you went from describing,
there's two parts of DMA, and both of them can be confusing.
One is just what it is, and how structurally, what it means structurally. Like this unit has autonomy to take memory
and to put things in memory or take things out of memory and how that looks kind of visually
in a block diagram. I think that's an important part of understanding what DMA is. But the hard
part for me has always been, how do I do it? How do I structure a program that uses DMA? Because it always verges into that area
that I've never been great at,
which is asynchronous I.O.,
where you fire something off
and then somebody comes back and tells you,
when you're in the middle of something else, perhaps,
oh, hey, that stuff you asked for is here.
It's always been difficult for me
to try to structure code,
because I come from learning to code back when
pac-man was new and not true you know everything was kind of logical flow immediate immediate mode
kind of this do this and this and this if then else and then maybe loop asynchronous stuff has
always been just a little bit makes my head itch because it's like, well, okay, how do I structure code if something can happen at any time?
So that's the hard part about DMA is for me is like, okay, how do I structure code if I could get this message from the serial port at any time?
What does that look like?
You know, you said that.
And then I tried to implement some of your notes, but I didn't understand what you were saying.
Because I approach it from the perspective of battery systems.
If your goal is to always be asleep.
Sure, sure.
And you wake up on DMA interrupts, that makes so much sense.
Oh, it makes sense to me, too.
It makes sense to me, too. But that's the asynchronous sense. Oh, it makes sense to me too. It makes sense to me too.
But that's the asynchronous IO is,
oh yeah, sure you handle it when you get a chance,
but most importantly,
you set these things up so you can go to sleep
and wake up when they're done.
And that all makes sense.
And I know how to do this now,
but even now, sometimes I have a little hiccup
and realize that, oh, this is an event. you have to structure it as an event handling system.
Yes, yes.
And so just talking about DMA off in a corner, I don't think it's sufficient.
I think it kind of puts tendrils out into the architecture of your program saying, okay, you have to have an event handling system or some structure to your program that makes DMA meaningful.
Because I've seen a lot of people use DMA, and it's like, why are you doing this?
You're polling, waiting for the DMA to complete.
You shouldn't have bothered.
You should have been asleep.
Should have been asleep or doing something else.
I mean, the point of DMA is the CPU is either free to be asleep or free to be doing something else.
Keeping your UI interactive.
That's one big thing that people don't understand sometimes
is if your CPU's doing a lot of I.O.
and you have a display and a touchscreen maybe
and you have a user interface,
all these microcontrollers only have one core usually these days.
No, they have more sometimes.
So it's hard to write a program that's snappy
if you're handling all that stuff kind of on demand and with polling.
And DMA allows you to just fire stuff off
and have it taken care of for you.
And then your UI can be updating and stuff while that's happening.
And so that's a big piece.
It's almost like multi-threaded code,
except your thread is your spy master controller or your DAC that can handle DMA. You're kind of
saying, okay, you're a thread that can gather data and put it in memory.
But that leads to all the unusual thread problems of this is happening out of order or when I,
or I'm getting a notification when I may be in the middle of something else.
They always find that the difficulty for DMA for a lot of people is just the setup, the configuration.
Which is also difficult, yes.
And so that was...
And it's different on every processor, right?
Right.
Yeah.
And I decided to do a metaphor about DMA standing for dry cleaning micro assistant.
Okay.
And you get a minion, you get an assistant, because you normally pick up your dry cleaning and take it home and put it in your closet.
But once you have an assistant, it's often harder to explain what you want to do to someone else
than to do it yourself.
But eventually, if you get busy enough, you go ahead and try to explain to the assistant,
this is where my dry cleaners is.
This is where I want you to put up my closet.
This is what I want you to do if my closet's full.
This is how many items you should be picking up.
Oh, here's my ticket.
Go, go, go.
Go get my clothes.
And text me when you're done.
And all of these things are kind of like what the DMA is doing.
You're setting it up so that a minion thread is...
It's not really a thread.
I don't want to get that confused. The peripheral. Something not important. Some other autonomous
unit. Autonomous union. I'm going to go back to Minion. Minion's better.
Is doing something and for the
most part that can be a huge luxury if you need it.
But if you don't need it, it's just a pain in the neck to have somebody else do it.
Yeah. But if you don't need it, it's just a pain in the neck to have somebody else do it.
So, yeah, I'm looking forward to fine-tuning that analogy.
We'll see how the students like it.
Yeah, that's a tough topic. And it's tough because it covers a lot of different use cases, too.
Yeah, you know, I only ended up doing DMA into the memory.
And I talk a little bit about memory-to memory to memory DMA as a fast mem copy,
but I don't really talk about DMA out.
And I talk about DMA in circular buffers, but...
That's probably good, because that's pretty hard.
I don't know if I got into enough detail there.
Anyway, yes, class.
Class is going to take infinite amounts of time for the rest of my life. It can't. It can't. You're done in five weeks and then you just repeat it.
Unless you're going to start from scratch. Well. What do you mean, well? I'm not going to start
from scratch, but there are things I want to change. Sure, but that's not infinite.
No, it feels infinite right now, but it's not.
So that's what I am up to.
If you would like to hire me, don't even consider contacting me until February.
And by the way, somebody asked me to do something involving a conference, and I thought it was kind of interesting, but it was for January 23rd, and I said no.
That was after we talked about it?
Well, yes.
You were telling me, like, I didn't know about this already.
I know, but I just wanted, I didn't click yes.
But you were thinking about it.
Well, it was kind of interesting.
But I didn't really want to do it.
I mean, it was kind of interesting.
I didn't really want to do it.
I'd rather do Eric on for sure.
I clicked yes.
So I should be ridiculed.
Christopher has a new contract.
Christopher has a new contract.
Yeah.
So we'll see how that goes.
I may help out if you want.
In February.
It is so hard to work. The last two weeks when everybody's been off and I've just been trying to grind out all the things I needed to do by the end of the
year. Yeah. Having two contracts wrap up at the same time in early January seemed like an
interesting bit of planning on someone's part.
I'm not saying it was your idea, but...
I mean, the trucks were supposed to be over in October, but then we got an extension, and then we got to drive them, and that was super exciting.
Yeah.
Yeah.
And the science platform I was done with in October.
2019.
Well, no, no, no.
I finished everything in October,
but they didn't start testing it
until December 15th.
So that led to a lot of
back and forth.
So, yes.
Origami will be very exciting.
Oh, I should put a link in
to the origami book
in case anybody wants to talk to me about it.
And the NASA book.
The book. I don't know if there's anything else anyway yeah did you learn anything interesting this year did i learn anything
interesting this year i learned did i learn nothing nothing like nothing um like technical, really. I did learn that practicing actually works.
This has taken me a long time to learn.
Much like I learned that doing homework
allows you to get better grades,
which I learned at 19.
Was it 19?
Roughly 19.
19 or 20.
When did we start dating?
I think I was 19.
Much like that, although it's taken me 40 years to learn,
is that sustained practice for a very long time
allows you to get better at things.
Whereas I thought if you just do like a half an hour
a few times a week, maybe, you know working on some exercises this is with
music uh i can sustain a high level of professional playing but it turns out if you play two hours or
three hours every day i'm not quite making that but if you get closer to that uh you can actually
improve which is uh which is a sad realization because I hate practicing.
Most people do.
So that's one thing I've actually learned this year is that,
I don't want to say practice makes perfect because that's stupid,
but focused practice actually, and you can practice wrong too.
I think I've done that before.
That's the other thing is you can practice wrong because I could I think I've done that before. That's the other thing, is you can practice wrong.
Because I could come down here and practice for two hours on drums every day and not get any better.
If I just noodle, do some exercises, don't record and play back and self-criticize.
But if you practice the right way with the right focus and allow yourself to have some iteration cycles, you can actually get better at things.
The critical feedback is very important.
Yeah.
And horrible. Truly awful.
Well, it's hard to get good at doing it to yourself.
Yeah.
Which is why teachers are useful.
But, yeah.
But, yeah, I think that's the big thing I've learned this year.
Oh,
oh,
the other thing,
the other thing,
there's two things I learned this year that I've hated knowing and,
and resisted.
One is the practice thing and the other is exercise.
It's good for you.
I've always been a person who struggles with various mental health problems.
And I expected to do much worse this year than I have done.
And part of the reason I've done better is I'm exercising every day
at a higher level of intensity than I used to.
Some of which is drum practice.
Some of which is drum practice, but not a lot of it.
Maybe 30% is drum practice.
But yeah, I wouldn't say I feel great mentally,
but the peaks are smoothed out.
The troughs.
The troughs are smoothed out.
Yeah, so it's been interesting.
Yeah.
Yeah, I think the exercises helped me too.
Chris got a rowing machine and I was mostly just going along because, you know, why argue?
No, one of the things I was supposed to be doing as part of my mental health stuff was more intense exercise because
full disclosure i have anxiety around uh intense exercise so in order to get your heart yeah around
heart rate and stuff so in order to get over that i needed to do things that that made me anxious
about that so i can kind of get exposure therapy around that.
And we have an exercise bike, but it's not quite the same. And I got very used to riding it.
And it doesn't do anything for your upper body. And the rowing, I thought, well, okay,
this is something people recommend that works out like a huge quantity of your body all at once.
And that's likely to be a very intense thing. And it'll be different.
So I won't have like anxiety associated with it yet.
Anyway, too much detail, but rowing was the choice for a reason.
But I, I wasn't, I was just like, yeah, sure.
Whatever.
I'll just keep walking my two to four miles in the hilly area and not worry about it.
Got to say hello to all the neighbors in
relatively COVID safe times. But then I started using the rowing machine. It is exhausting,
but I have more muscles now. I think you have the same number. It feels like more.
And, you know, I get the post-workout achiness, but I don't get as many joint achinesses as I was starting to get.
Well, that's the thing.
The other thing is I was having a lot of problem with my leg earlier this year to the point where I was having difficulty walking.
Sitting for a long time, lots of stuff was causing serious problem with my leg.
And I started rowing, and it was difficult to row with my leg. But after about two months of doing it, my leg was completely fixed.
So I think part of it was COVID and sitting on my butt for, at that point, a year and a half.
Anyway, buy our rowing machine.
What? No.
No.
Here's an Amazon associate link to our rowing machine.
You asked me what I learned this year.
Those are the things I learned this year.
They're irritating things that people tell you all the time.
Practice is important.
Practicing correctly is important.
And exercise actually is helpful for a number of things.
So I'm sorry.
No, I asked.
No, the audience, if you're hoping that either of those things were false,
because I've been hoping those things were false for my whole life.
And flossing is important.
You're going to go with that one too?
You have no empirical proof of that because your teeth are freaking perfect.
They're not perfect.
Knowingly perfect.
I was about to go to the dentist before
the latest disaster struck so they're not they're not perfect my teeth uh my teeth are shifting
because of the the clenching i do every night i think so yeah i can tell how well i slept by
whether or not my teeth fit together in the morning. How many cavities have you had in your life?
One.
Yeah.
I probably have 17 right now, but there's no way to know.
Until you know about them, they don't exist.
Schrodinger's cavities.
But yeah, I have one filling.
To be fair, I had braces,
which makes up for a great deal of dental work on the balance.
In terms of pain and suffering.
You got good genes.
I got good genes, but the teeth were not oriented correctly.
And so while some people might have to have fillings,
I had to have a medieval rack in my palate for six months.
So it depends on which you prefer
do you think this is why people listen to this show?
I don't care
it's New Year's week nobody's going to listen to this
this isn't even going to air I'm not going to put this out
what?
I'll put it on our sound cloud
we don't have a sound cloud
precisely
fine I will go back and read geometry with an introduction to cosmic topology well you aren't done yet We don't have a sound cloud. Precisely. Fine.
I will go back and read geometry with an introduction to cosmic topology.
Well, you aren't done yet.
You've got to put in 10 minutes.
We don't have to do anything.
Have we covered everything?
We covered everything that was on my list.
We didn't talk about what I was doing.
Oh, wait.
No, you're right.
You're right.
You're right.
You're right.
What are you... Well, we talked that you have a new client,
but what are you working on these days, Christopher?
Well, my old client, the whole radar thing, that's all working.
Yeah.
Speaking of things that work.
It's exciting to have things work.
Yeah, so I got that working with the CAN bus and the radar
and driving around with the video and collecting data.
So that's all real cool.
I get to drive, it's so fun.
I got to learn some 3D printing to try to enclose the electronic.
Well, so I had point-to-point wiring from the Xavier.
The Xavier is the computer I'm using.
It's from NVIDIA.
It's a little brick,
maybe like, I don't know,
three by four by four inches,
something like that.
And it's got a Raspberry Pi style interface on the side.
It's not a Raspberry Pi. It's on the side. It's not a Raspberry Pi.
It's a high-powered ARM thing with a GPU.
But Raspberry Pi-style connector on the side that the CAN bus stuff comes out of.
So I connected that with point-to-point, what do you call them?
Jumper wires.
Jumper wires to the transceivers with more jumper wires,
and then to some DB9s with jumper wires that connected to the actual radar sensor
and now to the vehicle.
And when he wanted to clean it up,
my solution was, oh, just hot glue it all in place.
I decided to not follow that advice.
Instead, I got a proto board
and I soldered everything to the proto board
appropriately, cleanly,
and with connectors and things. and so now there's a
a raspberry pi connector on a proto board that just goes into the raspberry pi uh header on the
xavier and snaps on there like a little uh memory expansion card on the back of a old computer or a
game cartridge something like that so it just plugs on there and right now it's
covered in kapton tape because i've been trying to enclose it in an enclosure so i went off to learn
fusion 360 to do that and i actually got some stuff that was close but the
i've kind of given up because the uh clearances on the xavier are terrible like there's no way
to clear the box and the proto board and then
have the USB-C interface
on the back of the Xavier actually not interfere.
There were some other issues.
So, I'm going to try a ribbon cable and stuff. Anyway,
long story short, I got all this cleaned up. The hardware is
nice and clean. Software works.
Collecting good data. Figured out
a whole bunch of things about the radar, so now it's actually
working really well. So we can do that.
And so, this week, I've actually worked on the software side and making a little visualizer that can play back all the data in real time just from the collected data and so you can adjust a
lot of the post-processing parameters in real time and see like field of view and stuff you know just
there's alignment issues between the radar and the video and it's much easier to deal with if you can
edit those.
So I had to learn, since everything is in Python,
I had to figure out, oh, I've never done a GUI in Python.
So what does that look like?
I have done a GUI in Python, and I did it with PyTickle.
TK Enter.
TK Enter.
Yes, sorry.
Tickle TK for Python.
Right.
Plus some other junk, I don't know.
There's like a few modules i don't
understand what they all are there's tk which yeah okay tk tickle tk there's ttk which is another
module that has different widgets that are more native to whatever anyway so i've been learning
that and like most ui libraries it's a ui library so it does everything that a ui library does
you didn't go for pi cute no? No, I didn't want to.
So I've done a lot of Qt development in the past,
and it's harder.
There's more to it.
I just wanted a crappy user interface.
Yeah, this wasn't, you know, for consumers.
Yeah, this just has to work.
It doesn't have to look good.
I mean, this can be like factory floor
garbage user interface
designed by
hot glue
yes the software of hot glue
so
now Qt you have to re-architect your software
a little bit
because it has signals and stuff
you have to connect
I didn't want to deal with it
and I didn't want to put that dependency on the client.
And TK is already a big enough dependency.
It's just weird to be using Tickle TK again,
because the last time I used it was 1995.
I was very disturbed to find TK a few years ago
when I had to do the interface.
I just feel like some things go away it wasn't that it was bad no it's fine it's totally fine it's just
are we still here i i felt yes yes yes i felt old and not old old and knowledgeable at the same time
well i didn't i remember nothing about it. I don't think either.
And back then we were using it.
See?
Now, what were we doing?
It was script.
Oh, TCL was its own scripting language.
And TK was the GUI thing.
So they took TK and put it in.
Okay, okay, I remember now.
Yeah, so we wrote a bunch of stuff in Tickle too.
Okay, back then.
Huh.
Huh.
And then there was Expect that went along with it for
communicating. Expect was great. What happened
to that? I thought it was
part of Tickle.
Yeah, but I just remember why I never used it again.
Because it was really useful for scripting
serial interfaces and stuff.
I think it's part of some of the
web interfaces
and some of the unit test
systems. Which which I mean
it was what we were
using TickleTK for
we just didn't
have those words yet.
For unit tests?
For manufacturing tests.
For the
clinic project?
Oh I used it
at HP.
Oh yeah.
I used it for
our clinic project
in school.
I ditched your
clinic project after the first semester.
So did two other people who stayed on.
Well, exactly.
At least I left the class.
Yeah.
So a couple of us kind of went on and finished a thesis instead.
Huh?
Oh, you went on a thesis.
Yeah.
Well, that's fine for you.
It was.
It was interesting.
Yeah, it was fun.
I did a thesis as well.
And a clinic project.
Well, your thesis was for a master's
degree. No.
I didn't do a master's thesis. Did you do a
thesis at Mudd? Yeah.
Because I was a math major,
not a CS major.
I did CS clinic
and I had math research.
What was your math research?
It was a kind of a implementation and review of an algebraic method for determining network reliability.
Oh, I do remember that.
Okay.
Sorry.
Okay.
Well, that's enough of this.
I'm sorry. I, well, that's enough of this. I'm sorry, I'm a terrible person.
You can talk about your origami geometric topology all day,
but as soon as I bring up something practical...
I wrote a whole software thing that reduced networks
and did all kinds of cool stuff.
It was hard.
Especially hard because I did not care.
This last semester of senior year, I did not care to do anything. And it turns out I kind of had to do something because
you had to present this paper in front of people. So it had to do something.
But I did learn that if you get good enough at LaTeX, LaTeX, LaTeX, I think it's LaTeX,
you can make a paper look good enough that people won't bother to read it.
I actually came across a paper today.
It was in PostScript and I was reading it.
I'm like, this is crap.
Why did I bother to go from PostScript to PDF?
Because it looked pretty, but it's, yeah.
Yeah.
I believe they wrote it in LaTeX.
Yeah, because LaTeX went to PostScript.
Right.
Yeah.
Anyway, are we done?
Are we done?
Can we put a pin in 2021?
I could be okay with being done with 2020 and
2021, both of them.
I mean, they haven't been
terrible for us, but they have
been tough. So, yes.
We can be done with that.
Thank you for
I don't know, being on the show?
Doing the show?
Listening to the show? I guess thank you for
listening to the show. To the listeners? Listening to the show? I guess thank you for listening to the show.
To the listeners.
Ah, that's better.
Yeah, yeah.
And to the dog
for sleeping.
If you're thanking me
for being on the show,
that's kind of...
Weird.
I know.
That's like saying
thanks for being an employee,
which I am not.
Anyway,
if you would like
to contact the show,
it's show at embedded.fm.
By mail.
Email. By email? Email. That's email. Oh, if you'd.fm. By mail. Email. By email?
Email. That's email.
Oh, if you'd like to contact us by mail,
there is a PO box at the bottom of our newsletter.
I was going to say, show at embedded.fm is our
email address. That's all. I was just adding useless
additional context for no reason.
So the address is at the bottom
of the newsletter, which you can sign up for
on embedded.fm slash subscribe. It's at the bottom of the newsletter, which you can sign up for on EmbeddedFM.com.
It's at the bottom of that page.
And now our newsletter will be prettier.
And if you send anything to our PO Box, the chances we receive it are very, very small.
Not that it won't get to us, just that you kind of have to email us and tell us you sent us something, because otherwise we won't check the
box.
Anyway,
yes, well, thank you, everyone,
for listening to us for another
year, and we will have more shows next year.
Including
Show 400.
Yeah. 400.
When we had Show
300, we had a party, a big party. We are not going to do that for 400. When we had show 300, we had a party, a big party.
We are not going to do that for 400.
Kind of sad.
We have a Zoom party.
We can have a call-in show.
Big Zoom party.
That's work for me.
Okay.
I don't want to do a call-in show because I have to figure out how to do a call-in show.
Al lived at the Chestnuts, an old-world residence of great charm,
which was grander than anybody else's, or seemed so to Pooh,
because it had both a knocker and a pole bell.
Underneath the knocker, there was a notice which said,
Please ring if an answer is great.
Underneath the bell pole, there was a notice which said,
please cock if an answer is not required. These notices had been written by Christopher Robin,
who was the only one in the forest who could spell. For Owl, wise though he was in many ways, able to read and
write his own name, W-O-L, yet somehow went all to pieces over delicate words like measles and
buttered toast. Winnie the Pooh read the two notices very carefully, first from left to right,
and afterwards, in case he had missed some of it, from right to left.
Then to make quite sure, he knocked and pulled the knocker, and he pulled and knocked the bell
rope, and he called out in a very loud voice, Owl, I require an answer. It's Bear speaking.
And the door opened, and Owl looked out.
Hello, Pooh, he said.
How's things?
Terrible and sad, said Pooh,
because Eeyore, who is a friend of mine,
has lost his tail and he's moping about it.
So could you very kindly tell him how to find it?
Well, said Owl, the customary procedure in such cases is as follows.
What does crustamony pro-sea cake mean, said Pooh,
for I am a bear of very little brain, and long words bother me.
It means things to do.
As long as it means that, I don't mind, said Pooh humbly.
The thing to do is as follows. First, issue a reward, then... Just a moment, said Pooh,
holding up his paw. What do we do to this? What were you saying? You sneezed, just as you were going to tell me. I didn't sneeze.
Yes, you did, Owl. Excuse me, Pooh, I didn't. You can't sneeze without knowing it.
Well, you can't sneeze without someone having been sneezed. What I said was first issue,
a reward. You are doing it again, said Pooh sadly.
A reward, said Owl very loudly.
We really noticed to say that we will give a large something to anybody who find Ezoar's tail.
I see, I see, said Pooh, talking about large something.
He went on dreamily.
I generally have a small something about now,
about this time in the morning.
And he looked wistfully at the cupboard
in the corner of Al's parlor,
just a mouthful of condensed milk or whatnot,
with perhaps a lick of honey.
Well then, said Al,
we write out this notice
and we put it all over the forest.