Embedded - 5: Passion Is Contagious
Episode Date: June 13, 2013Akkana Peck (@akkakk) joins Elecia White to talk about an introduction to Arduino workshop for high school students. Arduino boards are a fantastic way to encourage people into embedded systems. The b...oards are cheap, the starter kits are great, there are lots of things you can do with them, and the compiler software is free. Akkana's site (Shallow Sky) has the workshop outline, going from morning general activities to afternoon specific ones. The really simple circuit for the photo-theremin we had on the show is linked from there (and the latest code is on github). A separate post describes the the cheap motor boards she's been working on, including the specific chips (including the H-bridge). The summer camp we discussed is GetSET and they eloquently describe themselves as "a program for high school girls of underrepresented ethnic groups to show them that engineering is fun, is creative, improves lives, and is an exciting career option". It is free to the student, funded through the efforts of the Santa Clara Society of Women Engineers (SWE) chapter.
Transcript
Discussion (0)
You are listening to Making Embedded Systems, the show for people who love gadgets.
I'm Elysia White.
Today I'll be talking to Akana Peck about the intersection of Arduino, robotics, and
summer camp.
Hi, Akana.
Welcome to the show.
Hi, Elysia.
I'm happy to be here.
So summer camp, let's start there.
It sounds like fun.
Robotics and summer camp. How do
I sign up? Well, you can volunteer to help. We can always use people. No, no, no, no, no. I just
wanted to go. I'm afraid you have to be a high school student for that. Seriously, I hear you're
running a one-day workshop to teach high school students how to program Arduino? Yes. I've been
volunteering for about nine years for the Society of Women Engineers program called Get Set,
which is a summer camp for high school girls.
And it's an overnight camp,
and it's for high school girls that are underrepresented, minorities.
That's right, minority high school girls,
races that are underrepresented in science and engineering.
It's a one-week camp, and so they stay overnight.
They live with each other and the counselors,
and they basically live and breathe science and technology.
That's pretty cool, and the Society of Women Engineers puts it on.
That's right. They've been putting it on, I'm not even sure how long,
a couple of decades maybe.
I seem to recall that in around 2000, I participated
doing a workshop too. It was lots of fun. It is. It's a lot of fun. The girls are really motivated.
They're great. They're really smart. And you learn a lot yourself, of course, from trying to explain
things to people who have never done it before. Yes, yes. But the girls were all very bright and
they're selected, right? It's a, it's a application sort of process. Yes, they. But the girls were all very bright and they're selected, right? It's a application sort of process.
Yes, they go through an interview process. GetSet is all sponsored. It's free to the girls. And so they have to go through a selection process. The parents are interviewed, the girls are interviewed, and they have to agree to go to the program all four years of their high school career.
And they learn about science, technology,
and engineering. That's right. And robotics. And robotics. Now. So Arduino, I looked kind of over
what you were going to talk about, and I wanted to know more. I mean, what's the plan? Well,
I've been volunteering with Get Set for about nine years,
and most of that time I've been teaching JavaScript programming.
But I've been increasingly unsatisfied with that,
and I thought that it might be sort of more fun for the girls
if they could manipulate real things,
if they could make lights blink and buzzers buzz
and maybe even make little cars drive around on the ground.
I totally agree with that.
The first time that I managed to make a motor move,
and it wasn't just software anymore, it was me changing the physical world.
I love embedded systems, so I think Arduino is so much better than JavaScript.
Yeah, it is a lot of fun. It's really great.
And I find it fun, so I knew the girls would.
And Arduino is a great way to do that because the Arduino microprocessor is so, it's very cheap,
it's very accessible, it's programmed all in open source, so no matter what platform you use,
you can get the software for it. And the programming is super simple. It's actually
a lot simpler than the JavaScript programming we were doing, but it's so rewarding because, as I said, actual physical things change in response to
a few lines of code. Even lights blinking is just kind of magical. It's different than seeing
something on a screen doing something. It is. When you make your first LED blink with the Arduino,
it's really exciting. Okay, so you have a selection of
Arduinos. And and what else do you take? How do you I mean, it's got an LED that'll run.
What else do you do? Well, I do. I do have speakers, I figure the girls like making sounds,
they can make a little bit of music or just funny sounds. I have some push buttons, some potentiometers, you know,
control knobs that you can use to adjust things, make lights brighter or make sound go higher or
lower frequency or whatever you want to do. And I also have a lot of sensors. I have some distance
sensors, sonar range finders and things like that. They have infrared sensors that are like
the proximity sensors you'll see in people's backyards to turn on security lights. There
are tilt sensors, so you could make something like a secret box where a light comes on when you
open the latch. This sounds like a lot to cover in one day. Are you building all of these things,
or just one of them? No, I wish we could.
In the morning, we do simple things. We work with basically lights and sounds. And then in the
afternoon, the girls team up and they work on projects of their own choice. So some of them
decide that they like lights best and they want to do a light show and they'll get lots of LEDs
and make patterns with them. Other girls prefer sound.
And I have a few little cars.
I've scrounged some cars that used to be radio control.
People buy radio control cars and they lose the controller
and they then take the car to a thrift shop.
And you can go to thrift shops and buy these cars with perfectly good motors for very little money.
So I've been scrounging these cars and stripping
off everything but the motors. And then you can hook an Arduino and a little bit of circuitry to
them and control them. That's pretty cool. So you arrive and what kind of Arduino do you use
in particular? We use the Uno, which is sort of the basic Arduino. And that's the, it costs
about $25 if you're getting it on Amazon, right? Right, about $25 or $30 depending on where you
buy it. Okay, and it is absolutely my favorite way to teach someone how to start in embedded
systems because it's so easy to use. Yes, it's super easy to get started. I'm not a hardware
person myself. I'm not that
expert at embedded systems, but I've found Arduino to be very accessible to everybody,
including myself. And for those of you who have never used Arduino, it's based on an
Atmel processor. And so you're really doing the stuff you would do if you were doing it
professionally. But at a hobbyist level, it's fantastic for just trying
it out. And the community that surrounds it is gigantic. I mean, there are shields, which are
things that go on top of the boards, to do everything imaginable, from connecting Wi-Fi to
motor shields to do pretty serious robots. That's right. And there are tutorials too. For practically anything you
can imagine doing with an Arduino, you can find a tutorial online. And many of those tutorials
are video tutorials. So you really can get a step-by-step, hands-on approach. Yep.
But back to Get Set, because I'm pretty excited about that. How do you teach programming?
It's one of those things that I think many of us who grew up with it, we kind of taught
it ourselves.
But I assume these girls don't learn computer science in high school?
No, they don't.
They have very little computer science in high school and certainly no programming.
The girls who have gone through the Get Set program will have had
one workshop the previous year in Ruby programming. So they've been exposed to the concepts,
but they haven't had anything since then. So they don't remember most of it. And we pretty much have
to go over the concepts again. The Arduino is programmed in C, technically C++, but it's so
simple that they don't need to know a lot about C. It's not a scary
language or anything like that. And you give them lots of examples, so it's not like you're
starting with a blank slate. Oh, right, yes. We start with the blink example, of course, the one
that makes an LED blink, and get them to modify it, make it blink faster or slower or more times,
or blink a second LED or something like that. So you can start from
existing code and build up. And that's, that's the easiest way for anyone to learn. And so I have my
Arduino compiler up. Is it really a compiler? I guess it is because it, it really is a compiler.
It, it takes the code and it combines it with all of those C++ functions that make it look like it isn't even really C.
And then it downloads to the board.
You just push a little button and it poofs over the USB.
And there's a lot more going on behind there
and I kind of want to talk about that,
but I'm not sure that's going to make it in this show.
So I have my compiler up and under examples,
there's basic and then there's blink, which is what most Arduinos come programmed with. Yes. I actually
removed that program because I want them to have, I want the girls to have the experience of making
their light blink for the first time. And if it's blinking when they first turn it on, that's no fun.
Well, I seem to recall the first thing everybody does with this program is to change the timing.
Blink normally comes, and I mean, I'm looking at the code.
It says void setup pin mode 13 output, which is 13 is where the LED is.
And then void loop, write 13 high, delay 1,000, which is milliseconds.
And then write 13 low and delay another 1000.
And it's commented. I mean, whoever did the Arduino programs, did them assuming that you don't know what you're doing. Right, exactly. And so if I change this to be delay 500, instead of
delay 1000, it's going to blink faster.
That's right.
And that's what you have them do?
Yes.
And, okay, so you don't give them this example.
Do they have to just type it in?
No, I do give them the example.
The example actually comes with the Arduino software.
So they are presented with computers that have this already loaded,
and they go to examples, basic blink.
Okay.
And do they ever notice that there are 100 different examples
and do they try other things right away
or do they usually stay on your cookbook?
Some of them do.
That's part of the wonderful thing about teaching them
is that there's such a wide range
and some of them will immediately get
how to make their light blink faster
and they'll want to move on, and they'll want to experiment.
And so you see some people are still working on the first project,
and others have three LEDs hooked up, and they're blinking them in sequence.
That's actually one of the challenges of teaching programming,
is that people all learn at different rates.
And so you need to have projects for some of the students to some of the students to do while other students are catching up.
I think that's true of a lot of teaching. Elementary and high school is making sure you can accommodate different learning speeds and methods.
Yes, I'm sure it's true of everything.
So different learning methods. Do you do you like them to maybe have a cookbook do you do you have a list of instructions for them
or do you go through and do the stumbling method I I you know where you just tell them you should
do this and then you kind of help them along but you let them get a little hurt first that's
something I've struggled with and I'm trying to find the right balance. I'm one of the people who learns a lot better by stumbling along.
I need to have to figure it out for myself and work a little bit.
And some people prefer the cookbook method.
Now, I remember when I was in elementary school, I had some people come into my school.
They took some of us out of class and took us to the school library. And they set
us down at a table, and they gave each of us a light bulb, and a battery and a piece of wire.
And they said, make the light bulb light up. And of course, this sounds like a completely trivial
thing to most of us, right? It's not so trivial when you're in second grade or whatever it was.
And you don't know what the word circuit is.
Right, right. You have no concept of a circuit. You don't know that the two ends of the battery
have to be connected. You don't know any of this, and you just have to figure it out by
experimentation. And it took a long time, but we all got our lights working. And that was really
exciting. It was so exciting that I went
around for months afterward with my own batteries and light bulbs showing off how I could make them
light up and make my own flashlights. And so I'd like to give that sort of excitement to the girls,
let them figure out how to do things. But on the other hand, some of them get frustrated if you do
that and you need to give them instructions and give them more immediate reward. And so I'm trying to figure
out how to balance that and teach both types of girl. Yeah, I mean, you don't want to drive them
away from the joy of engineering, just because they didn't get that initial aha moment. Right. But anybody who can get that Eureka thing going on,
you want them because that's, that's so golden. Right. I suspect that the ones who are destined
to be engineers are probably the ones who prefer to figure it out. But we don't want to alienate
everybody else and make them think, oh, engineering is boring and hard. Because it isn't. Right. It's
fun for everybody. And it it's fun even if you're
following cookbook instructions it's just maybe not quite as much fun for me well sometimes i
mean electronics especially um less coding because that's something i'm pretty good at but
electronics what order you have to put down the wires in order to get them so that they don't end
up with a snarly mess. And, and the cookbook of
you solder this first and then that because if you do it the other way around, you end up with
a giant solder ball. I end up with a solder ball anyway, most of the time. Yeah, me too.
But sometimes the cookbook is a way to break into something that's totally foreign, to start building the intuition that leads you to these moments of clarity.
Right.
So, yeah.
That's true.
Both ways.
Yeah, and I admit I do follow a lot of cookbooks,
and sometimes I prefer the cookbook.
Okay, but I can see where you're...
So are you tempted to just take a couple of batteries and some LEDs
and make them have the same experience you did,
or you think they'll live in a different world?
I think they live in a different world.
I think it would be less rewarding.
And also, these are high school seniors, and I was a lot younger than that.
Elementary school, yes, okay.
Yeah, I think that might be a little basic for high school seniors.
I think in elementary school, the connection between the light switch and the light going on, that was magic, wireless magic.
Right.
There was no actual connection.
Okay, so cool.
So let's get back to the tactical bit.
You set up the Arduinos, and you give them some breadboards, and you give them the tactical bit. You set up the Arduinos and you give them some breadboards and you give them
the blank example. What are you talking about during this time? Well, I have to explain
everything. I have to explain breadboards. Some of them have seen breadboards before because there
is an electronics workshop for the younger girls that gets it, but they probably don't remember
how it works. They don't remember that an LED can pass current in only one direction,
details like that.
So we have to go over everything.
And in fact, I'm going to start probably even before they do Blink this year,
I'm going to have them just plug the LED into the Arduino as a power source
and light it up steady and then have them rewire it to do the Blink example.
Yeah, then they get the idea of what a
circuit is. And even high school students, they may have heard it, but it isn't. And so by breadboard,
you mean the little, uh, things you can buy that are about five, maybe $10. You get a big one and
they're, they're connected across multiple holes. And then there's a ground plane and a, a power
plane off to the side.
Right.
Okay.
Right.
Solderless breadboards where you just poke the wire in and you don't have to twist anything
together.
You don't have to do any soldering.
We don't do any soldering during the workshop.
I think that's kind of cool.
I mean, not just because I'm crap at soldering, but also because you can do that.
You can use jumper wires to get it all built.
Okay, so now they know what a breadboard is, and they know what a microcontroller is.
Do you discuss the difference between PCs and other things that run software?
I basically just describe a microcontroller as a tiny computer.
We don't have to get into details of the difference or talk about operating systems
or anything like that. Yeah, that would be more than one day. And do you talk about other things
that have microcontrollers? I mean, do you get into the whole theory of embedded systems or do
you just kind of go for it? Just kind of go for it. I try to tone down the amount of lecturing I
do. That was something I think I did wrong in my
JavaScript class. I did too much lecturing and not enough having them do things. Well, this is
summer camp. This isn't school. It's supposed to be fun and supposed to be hands-on. Right. They
didn't come here to listen to me talk. You know, I love to talk, but that's not what it's about.
Okay. So, so they come in, they they they wire up an led and then they wire
it up so that you can control it over the arduino and you run some blink and then you change some
some uh parameters so that it blinks differently so that they know they have control over it
um i like this idea of giving them the control because that's the part where programming becomes fun.
It is.
Let's see.
It looks like in your outline you have discussed the structure of the Blink program.
Is that just discuss the code?
Yeah, that just means explain.
An Arduino program has two sections.
It has setup where you do things that you do once at the beginning of
the program and loop, which gets called over and over again. Right. And in my setup, I set up the
pin to be the output and then the loop is to blink it. Okay. Right. Exactly. So they have to know
that. I have to tell them about that. They don't actually, most of them don't remember what a loop
is, the concept of a loop in computer programming. And that's something that we can get into with them later.
But mostly we don't have to with the Arduino.
I just have to tell them loop gets called over and over again.
All right.
It's a little hard.
I mean, that's kind of like, what is yellow?
It's a loop.
This is yellow.
It's just something that is.
Right.
There are ways of explaining that by relating it to real world things.
But explaining concepts of programming is hard.
You know, there's a whole industry around that, I suppose, in teaching programming.
Yeah.
And right now with the summer camp, the goal is to get them interested.
Yeah.
Interested enough to take one of those classes.
Right. Yeah, I want to get them just mucking with things
and plugging things in and seeing what happens.
And if they blow up an LED or something, that's fine.
Everything we have here is cheap.
Everything we have here is meant for them to play with.
Do you talk about ESD protection or you just skip that?
I skip that.
Fortunately, the Arduinos are really pretty robust.
I've never managed to blow up an Arduino,
and I should knock wood here because probably now that I've said that, I will.
No, I've only done one, and that's pretty good for me
because if it can be blown up, I will blow it up.
Yeah, you really have to do something serious to hurt an Arduino.
So they're pretty robust about static.
But they're not very
robust about getting entirely the wrong power supply yeah it's possible okay so um then you
add another led yes i what i've been doing is telling the girls who are going fast about another
led and the ones who are catching up i don't they
don't have to worry about it they can move on when it's time to move on okay so that's a great
opportunity for the fast and slow girls to to all be engaged and having fun and then a push button
yeah push buttons of course are the simplest way of getting input.
Either you're getting a signal or not.
I gloss over the pull-down resistor bit.
Actually, one of the things about Arduino, for those of us who are not that good at hardware,
is that the tutorials are really good about explaining things like pull-up and pull-down resistors.
This was a concept that I had heard about all my life and I had never really grokked it until I got into the Arduino
and ran through one of these tutorials. It was like, oh, is that all it is? Why didn't they just
say that? But I don't think the girls are quite at that stage. I don't think they really care
about pull up and pull down resistors. So I just tell them wire resistor here and, and then read the value. Usually with resistors and capacitors,
I like to just pretend that they're a myth put in for electrical engineers so they can keep their
jobs. That's mostly what I think about them anyway. Oh, I'm supposed to put a capacitor here. Why? I don't know. So the pull-up resistor in the
LED is used to make sure that you don't send too much power to the LED. Right. And I do explain
that to them. And I may try to demonstrate that this year. I didn't last year. But it might be
fun to demonstrate. And by demonstrate, you do mean plug it in and let it get hot and blow up,
right? Yes. And watch the smoke come out. out. I think that sort of demonstration just makes it so much more fun
and more physical and realizable.
Yes, so I may do that just because it's fun to blow things up.
I may volunteer just for that.
Okay, so pull-down resistor, yeah, that's fine.
I totally would gloss over that.
It's the magic bit that makes it work.
Right.
And the other thing I gloss over is debouncing the buttons,
which you do have to do if you're doing a real circuit with push buttons.
Oh, but not this.
Yeah, nobody wants to think about that.
So if they push their button and they get a bunch of ones instead of just a single one,
I'll just tell them, well,
sometimes that happens and there are ways around it, but don't worry about it for now.
So debouncing, in case you are listening and you don't know what that is, have you ever had
a remote control that when you pushed the up arrow, it went twice, even though you're pretty
sure you only pushed it once, or you push the volume down
button, and suddenly it's all the way down, even though you only hold held it for like a split
second. That's a bad case of debounce, right? It's when your microprocessor is hearing lots of
okay, I push the buttons, when in fact, only push the button a little. And it may be because there's a physical connection to the switch.
There's a little spring in there, and it's springing back and forth.
And going up and down, and the microcontroller is hearing a whole bunch of,
I'm on, I'm on, I'm on, when really what it should be hearing is,
I'm on, I'm still on, I'm still on. And so debouncing
is just one of those things you have to deal with. There's always noise on dry contacts,
which is how the switches are built. So that's the short form of debouncing.
Right. And of course, some of the girls will be interested in details like that. And we can tell
them, we try to have a lot of volunteers who can walk around and sort of explain and bring people along at different speeds.
So we can explain things like that to anyone who's interested.
Oh, that makes a lot of sense. And how many volunteers do you usually need?
We can get by with about three, but it's better to have six or so.
How many girls do you usually have? That
varies a lot. 10 to 15. So it's a pretty small class. Yeah, but having one person who kind of
knows what they're doing, or at least can Google fast enough to fake it, can definitely make it so
that the girls get individual attention. Yeah, it makes a huge difference.
Okay, so let's see.
Next on your list is control knobs.
What are you having them do there?
Those are just potentiometers, variable resistors,
where they twist the knob and something can happen.
So they might, if they have a blinking LED,
they might change the speed of the blink so it blinks faster or slower depending on how you twist the knob. And that's an analog input.
That's an analog input, right. And the Arduinos are good at that. Do you tell them about the
magical, mysterious difference between analog and digital? Or do you just let them play with it and
sort it out and not discuss Nyquist and all of the
scary things they really don't need to know about? Oh, I don't discuss anything with Nyquist, but I
do tell them the difference between analog and digital. That's definitely important and it's
worth knowing. And you need to know it for the Arduino anyway, because the Arduino has different,
you plug into a different place for doing an analog input versus a digital input.
What do you say is the difference?
Basically, a digital input is something that's one or zero.
It's either on or off.
And an analog input can be any value.
So it's something, for instance, it could be a floating point number, but that's more a computer concept, I guess.
You could, it's anywhere on the number line.
Okay. Okay. Yeah, I'll buy that.
Sometimes I've heard it as the number line is always a good place to start is between zero and one.
You know, on the number line, there's lots of other
little bits in there, right? They're all the irrational bits and the rational parts that are
non-integer. And the digital part is integer and analog is so much more than that.
Right. I've learned to be a little bit cautious though in using mathematical analogies because
the classes vary so much from year to year. Some
get set classes are really into math. And when I was teaching JavaScript, I had a project where
they had to calculate where a mouse click happened and whether it was inside the flower picture or
not. And some of them really got into that and they just loved it. And others just completely
shut down. They were not interested in doing math. This was not what they were there for. It's summer camp. Quit making me
do algebra. Exactly. So you have to be sensitive to that. You know, if you're a real teacher during
the school year, then okay, you have to force them to learn math. But if you're doing a one
day workshop, you can't force anybody to do anything they don't want to do. You have to keep it fun. Yeah. And that's sometimes more difficult, even though you don't have to give
them an exam. So they have to prove their knowledge, keeping it fun. It's well, I think
that's why Arduino is better than JavaScript. Again, so much better. Okay, let's see. And
Println, the Arduino is really good at giving you data back.
And you show the girls that.
Yes.
That comes a little bit later, debugging skills and learning how to bring up the window.
I found that sometimes it's hard to...
The Arduino development environment tends to get rid of its serial console at times when you least expect it.
And so reminding them that they have to bring the serial console back if they want to look at the debugging output has sometimes been confusing.
And I try to avoid that sort of debugging if I can, but for some projects you need it.
So I leave that till a little bit later in the workshop.
And that's under, so in the Arduino programming system,
that's under tools, right?
I think so.
Yeah, yeah, there's a serial port.
And when you're using it, it's just one cable.
The USB cable goes from your computer to the Arduino,
and that's used for programming, but it's also used for serial,
which I think is why they have to close it,
because they can't support both at the same time.
Probably so, but you would think that the software
could just leave the window up and not show anything in it.
And put it gray.
If they were writing the software.
Yes, yes.
It does seem like you could make that more obvious.
Let's see. And then you talk about control knobs and how to make the LEDs flash faster.
So proportional to the analog input would be the delay.
Right.
Okay, that sounds cool. And then the part that I think would be fun, photoresistors.
Photoresistors are cool. They work pretty much
the same as a control knob, but they vary according to how much light shines on them.
I've found that they can be a little bit flaky if you just have them in a room.
So I've started collecting toilet paper tubes to put around the photo resistors.
And then the light sensor is only getting the light that comes down the tube, and you can wave your hand above it to control how light or dark the sensor is.
And I like the progression.
You've gone from a push-button input to control knob,
and then, I mean, the photoresistor to control knob switch,
that's easy because they've already got it all.
I mean, it's just replacing one thing for
another. Right. You should be able to use the same program for it. Just replace the physical device.
And photo resistors are one of those things that I just think are kind of magical. Something
happens because of the environment where a control knob is me turning something. It's me physically
doing something. Photo resistors are just. I agree. I love sensors anyway. I love all kinds of sensors sensing the world around you.
Accelerometers. Oh, they're going to need accelerometers sometime soon.
I have a couple of accelerometers and I've debated whether to try to use them in the class.
Inertial systems are kind of mentally challenging, although most of them probably have seen Wii controllers.
So now they're not as strange as they were when we grew up.
Yeah, I don't think they're conceptually challenging because most of them have used smartphones and they know about tilting the smartphone horizontally and the text rotates at 90 degrees. So you could have three LEDs
and have it be proportional to the three axes.
You could, but that's getting into
a little more complicated programming.
Yes, yes. I always want more.
I do too. I wish I could do this workshop
as a week-long workshop or longer
because we would definitely get into things like that. Accelerometers are very cool. And you do LED fading as part of the
morning so that they have the ability to control the LEDs at different brightnesses. I haven't
actually decided whether to do that. The Arduino can do that via pulse width modulation. It doesn't
have a real analog output, but it has something where
it sends pulses faster or slower. And you can fade an LED with that, but I'm not sure whether
I'll have time for that in the morning. Well, and pulse width modulation is a really good way to do
this, especially for LEDs. Although understanding how that percent in pulse width modulation works is not easy.
Is there a lot of Arduino support?
You just send 80% and it does 80%?
Oh, yeah.
The Arduino handles all the pulse width modulation for you,
and you don't have to do the math.
You don't have to worry about the delay.
No switching frequencies or anything like that?
No, you just send a 90 or a 125 or whatever.
And then I like in your outline how you say that you may skip sections
so that you can do piezo speakers before lunch
because that's the only way that the girls will really pay attention
in that last few minutes before they eat.
Right.
Timing out a one-day workshop is always a little bit
challenging because everybody's getting a little bit overwhelmed before lunch and a little bit
antsy and they know lunch is coming. So you want something that's a little silly, fun and silly.
And also when you have people making weird sounds, it's going to be distracting for everybody else.
So you have to pick a time when it's okay to be distracting because they're going to be distracting for everybody else. So you have to pick a time when it's okay to be distracting because they're going to be distracted anyway. And the same for the end of the day.
We've found that we can't really go all the way through to the end at four o'clock. We have to
sort of wind down and have them report on things and discuss what they've learned.
Yeah. Well, I mean, even for me, I go from eight to four straight.
Oh yeah. It's a lot of...
At four o'clock I'm toast and to 4 straight. Oh, yeah. At 4 o'clock, I'm toast.
And they're learning a bunch of stuff.
Yeah, it's a lot of material to cover, and they're saturated, and anybody would be.
So what do you do with the speakers?
With the speakers, the Arduino has a really nice convenience function called tone,
where you just give it a frequency frequency and it makes a noise with the
speaker. And discovering that really made a difference to me because it makes the programming
so much easier. And it also makes a better sound than if you try to do your own loop and calculate
delays and things like that, which was what I was doing before. So I just told them that,
and I show them how to make maybe a sound in one frequency and say try changing it.
See if you can come up with ways of – see what creative things you can do.
And maybe give them a little hint that might lead them to going – or something like that.
That makes sense.
Have you had anybody particularly musical
who's tried to do Happy Birthday or anything?
I was actually surprised that we didn't last year
because usually there are a few girls
who are very interested in music
and even want to do music as a career,
but nobody really tried to do music
on their speakers last year.
Well, and Happy Birthday is copyrighted and illegal,
so be careful with that one.
That's right. Someone might sue us.
So it sounds like you've got, I mean, that morning program,
you've got fiddling with breadboards,
teaching them about power and ground.
What else are you trying to cover as far as concepts go?
Well, the main concepts that we're trying to cover
are programming.
What is a breadboard?
What are power and ground?
What is a program like?
Even though we're not talking about
real programming concepts,
we do have loop, which is being called over and over,
and usually we've covered if-then-else
sorts of clauses by then.
So I'm hoping they understand that.
How to set up a variable, because that's something they got the year before in the Ruby workshop,
but they've mostly forgotten what a variable is.
If you're only doing programming once a year for one day a year, I don't think I'd remember.
Yeah, and variables are actually sort of a hard concept for people to get, a lot of people.
I'm not sure.
Have you ever had algebra?
I guess algebra variables and computer variables aren't really the same.
They don't relate them to each other.
You don't solve for X when X is in a loop and you're incrementing it.
Yeah, you would think that it would help, but it doesn't seem to.
It is a difficult concept.
So I want to get them understanding that at least, variables and if-then-else.
And then making sure that they really start thinking analytically
and can debug their programs from it isn't going the way I thought it was going to,
oh, that's what I forgot.
Right.
One of the things that we always hear in feedback,
the girls always fill out feedback forms at the end
to tell us what we could have done better,
what they liked, what they didn't like.
And there are always some who didn't realize
how picky computers were.
We who work with computers know that they're completely picky. You
leave off a semicolon in the wrong place and your program means a totally different thing.
And that's not something they've dealt with before. So some people are pretty shocked by that because
we've all had that experience. You just pound on some bug for an hour and it turns out to be some stupid syntax error you've made.
It's always a typo.
Right. And we have as many volunteers as we can get going around looking. In fact, this year,
there's an organization called Code Checks, which is helping with the volunteering.
So we'll hopefully have a lot of women who are very good at programming who can see these things,
but it's still hard to spot. When you're looking over somebody's shoulder and you're looking for that typo,
it's really easy to miss it. Well, and these aren't really experienced programmers. They're
going, and they probably aren't really experienced typists. Right. Well, they're pretty good at
typing these days. When I first started GetSet and we were doing the Java and JavaScript workshops,
typing was actually a really big deal. And the girls who were fastest, the girls who really
seemed to have everything together, usually were the best typists in the class. And everybody else
was having trouble typing in the code. So I've tried to reduce the amount of typing they have
to do. But these days, it's not that much of a problem. They all take typing in high school, they're all good at it.
And of course, they're all typing things into Facebook all day.
Oh, I didn't think about that. Yes, that would make them better typists, I suppose.
Okay, so they go off to lunch, and you collapse in a heap of exhaustion, gearing up for the afternoon.
And this is where it goes from your learning stuff,
you're starting to understand the concepts,
to apply these concepts to real things.
How does that work?
Well, before lunch we told them that they're going to be working on projects,
so think about
what you like best, what you think is coolest, and here are some of the sample projects that you
might be able to work on. And so they come back. Sometimes we have a little bit of a few more
exercises after lunch, depending on what we've done in the morning. But pretty shortly, we'll get
into, okay, what do you want to do? Get together with teams.
They work in teams anyway.
We have them work in groups of two or three, and that way they can help each other, and that has helped a lot.
For teams, they can stay in the same team or they can move around.
They can get into bigger teams if they want.
And they can decide, do they like light shows best?
Do they like music best?
Do they want to put them together? Are they intrigued by the little robot cars or maybe distance sensors, sonar rangefinders, proximity
sensors? You know, so I tell them about what we have and, and then they can just go up to the box
and pick parts or they can ask or whatever they want to do. And so they get to build something.
Yeah, they get to build something. And it's something
small. You know, it's limited what you can do in a couple of hours with one morning's worth of
instruction. So we can't be too ambitious. But still, they're building something. Well, these
are the sort of things you can build on a Saturday morning. Anyone can do it. Right. And they're the
sort of things you build. And at the the end you have something that's fun yeah
so one of the things on your list um i like this one our range finder but i'm not quite sure i'd
use that without a robot on the other hand your theremin i like the idea of that because it's a
it's a pretty simple circuit and uh and right before we started the show, we kind of built this up. So I'm going to play it for a
few minutes. And let me tell you, walk through what it is. Akana has the software on her GitHub
site, which will be linked to the show notes. But if you, I think it's github.com slash akana akana and i downloaded the code and put it into my arduino compiler and um
and downloaded it to the arduino uh there's a little button that says download or upload or
something upload and this circuit is super simple we have one pin going over to a resistor, which goes to a photoresistor.
And that will be the thing that is the input to how our sound is working.
And then we've got another pin on the PWM line that is going to the speaker.
So we're getting an analog input for how much light we're giving it and a PWM output for making the speaker have different tones.
Okay, now I'm going to plug it in.
Gosh, that's kind of annoying. Oh, I liked that.
Do that again.
And my desk clamp.
And so what's making it go really high is when the light hits it.
But.
Okay.
That's not what I wanted to do.
And so there's the toilet paper roll covering the light
and the light on my desk and the little Arduino,
and it's all of four wires and took us ten minutes to build,
mostly because I was untangling jumpers.
Nice simple circuit.
You can make spacey noises.
It's perhaps not very musical, but it's fun.
And you get to the end of something,
and I could totally see using this for something fun at Halloween
and showing my godsons that they can build this.
They're in elementary school.
So it's just cool.
Maybe they wouldn't get all of the software.
They wouldn't be able to write it themselves or anything like that.
But it's neat.
And robotic cars.
That is a pretty ambitious thing to do for a day.
It is.
The robotic cars are the hardest thing that I've tried to do. They're a lot harder than everything else put together. And I'm not sure why motors are so hard through the Arduino. So you have to have a separate chip called an H-bridge chip.
So I've made an Arduino shield,
which is something that plugs into the top of the Arduino that handles all that.
And then you have to have a battery pack.
For example, I have, I think, eight AA cells to power the motor in the car.
And when you just power an Arduino, you need like two, right?
Oh yeah, the Arduino, a nine volt battery is a really good power source for an Arduino,
but Arduinos are very forgiving about their power source.
You can power them off almost everything, including just the computer's USB port,
if you don't have to drive around.
But you need all of those extra batteries because motors take so much more power. It's all the juice that they need in order to get going.
They do. And to power the motors and the Arduino at the same time so your car is self-contained,
I've found even eight AA cells sometimes aren't enough. So you're carrying quite a bit of battery
weight already for these little cars. Now I. Now, I have some lithium polymer batteries that I use for model airplanes,
and I've tried powering the cars with those, and those work much better.
The problem with lithium polymer batteries is that if you short the contacts accidentally,
they blow up in a fiery pillar,
and that's not really something I want to have happen during a high school workshop.
The napalm-like effect of a lithium polymer battery is just a lot more dangerous than the
fun of an LED blowing up. It is. It's a lot less fun if it happens in a computer lab that
you don't control with a lot of high school kids standing around. It's not really something I want to explore.
I have thought about bringing some of these LiPo batteries along
so that if anybody does choose the car as a project
and gets it working well with AA's,
then maybe I can say, and now, here, try this.
And the car will go faster because the batteries are smaller,
the lithium polymer right and much
more powerful also they can deliver a much higher current that's why they're used for airplanes and
then you get to wave your wand and be the magic fairy godmother who says yes i can make it all
work just so much better right right so i may try that i haven't decided if it's worth the risk yet
i don't know how many decels it would take, but those are just as heavy.
Yeah, those are no better. I experimented with D cells and with six AA's rather than eight,
and it depends on the car.
Sometimes it works, sometimes it doesn't.
But even with the eight AA cells, and sometimes even with the lithium polymers,
I found that the cars will drive for a while and then you'll try to do
something and they'll just poop out. And I think it's the batteries being exhausted, but I'm not
sure. I haven't quite worked it out. So I'm unhappy with the cars. They're not really a very robust
project. They're hard to work with. Last year, we did have one team of girls who chose a car as a
project. And it was harder than I didn't have all the pre wiring that I've done now. They did get
it working. They got it moving forward slowly, but it it wasn't super satisfying. I mean, it was cool
for everybody to watch the car move, but I don't think it was enough. You know, I want them to have
something more rewarding than that.
It was more an inchworm than a speed racer?
Yeah.
And it didn't do anything useful.
It just went forward.
It didn't integrate sensors.
It didn't stop when it saw the wall or anything like that.
Oh, you don't even need control for that.
You really just need to hook up the batteries.
Well, yeah.
Have you gotten a motor shield?
I know those are kind of expensive,
so you probably can't get enough for everybody.
That's the problem with motor shields, but I ended up building my own. There's a chip I use,
a dual half bridge chip, and I don't remember the designation of the chip,
but you can make a pretty simple circuit out of that chip, which you can use to drive motors,
and that's basically what a motor shield does, except that you can make a pretty simple circuit out of that chip, which you can use to drive motors. And that's basically what a motor shield does, except that you can build a shield for about $8 instead
of about $30. Well, they need to make profit. Yeah, that's fine. But when you're outfitting
a class and you have no funding, it's not so good. So I ended up buying a lot of chips and a lot of shield PCB boards and
soldering things together, and I've made my own shields. And that's what I'm going to be using
this year. And I think it'll be a lot better than what we were using last year, which was
little breadboards with about 12 wires sticking out in various colors and instructions saying,
plug the green wire into eight and the
blue wire into nine. And there was just too much wiring and that was no fun for anybody.
I could see that, especially when you're trying to teach them programming concepts.
And I'm trying to teach them that this stuff is fun.
Yeah, yeah, I could see that. So, so at the end of the day, you mentioned show and tell.
How does that go?
I mean, are they excited about each other's projects,
or are they just really proud of their own?
They're pretty excited about each other's projects.
They'll applaud and cheer when a light show is cool or whatever.
And do they want to look at each other's code?
No.
Ah, well, maybe this year.
Right. I'd like to get them taking the code home, downloading it or something like that,
and maybe even buying Arduinos for themselves at home.
And that's one thing I stress to them, that this stuff is so cheap.
All the hardware we're using is so cheap that it doesn't matter what your income level is.
You can buy it for
yourself and play around at home if you want to. Well, yes. And there are lots of Arduino kits that
have a few LEDs, a little motor, a few sensors. And for an extra 10 bucks, you get most of the gear
you're providing to them at this workshop. Right. It's really easy to get started.
And I suspect that if the girls are very excited, there are other places they could go.
I mean, certainly if someone said, oh my God, I love this,
neighbors and godsons and all sorts of people who have talked to me,
you know, if you're that excited, if you love it that much,
I think the funding can probably be handled.
It probably could.
It would be nice to see a program like this for kids.
I would love to see that.
I don't know of anything like that in the South Bay.
I know there are a number of robotics clubs,
and I know that many of the meetups say high school students welcome.
They do, but I don't know of any that do basic Arduino-level electronics.
Maybe I'll look at that, and we'll put it in the show notes.
That would be great.
That would be kind of cool.
Yeah.
I mean, if you're a high school student and you're interested,
just drop me a line.
I want to talk to you. Yeah, maybe we can get something started. Yeah. I mean, if you're if you're a high school student, and you're interested, just drop me a line. I want to talk to you. Yeah, maybe we can get something started. Okay, this is a lot of
work for you. I mean, you do these motor shields, you've bought a bunch of Arduino boards, you're
giving up your time, you're organizing volunteers. Why? Why do you do it?
It's fun.
It's fun to try to teach these skills and watch people get excited about it,
people who haven't had the opportunity to learn this sort of thing,
actually turning on their own LEDs and writing their first program.
I like the idea of more people being able to learn this.
All right.
Yes.
The joy of seeing the spark happen for somebody else.
And I suppose there's a slightly, there is some benefit to me in that, as I mentioned earlier, there's no better way to learn something than to try to teach it.
And in trying to make this stuff simpler, in trying to figure out what the hard parts are and what the simple parts are,
I learn it better too.
I've often heard that volunteering needs to be talked about.
So many people are shy about getting involved.
And it is very rewarding.
It is. It's a lot of fun.
I was kind of petrified the first couple of times I volunteered at Get Set.
Now, I give a lot of talks.
I go to technical conferences and I speak at local computer clubs and things like that.
I'm not afraid of public speaking.
I was so scared of appearing in front of a group of high school students because I figured they would think that I was an old fogey. I wasn't cool. You know, I just, I don't know a lot about talking to high
school students and they're great. I mean, they, they really, they aren't like that. They're really
attentive. They're really interested in learning and Get Set also gives a lot of help in that there are volunteer orientations where they give you tips on talking to high school girls and what sorts of things they're interested in.
And if there's a problem, how do you resolve it?
There are workshops for practicing things like that.
What if somebody isn't following along or is being disruptive?
What do you do?
And that was very helpful too.
So I'm a lot less scared now. Which means you're more equipped to handle it in other situations.
The heckling you can get from a high school student, the way you handle it is pretty similar
to the way you handle it if you're at OSCON or any of the major conferences. Yes, that's true. I think I'm
probably more equipped to handle a heckle during a technical talk too. And having to put together
a workshop like this, where you start with basics and go step by step until you get to something
cool, that's a pretty good skill, a life skill. It is. That's something that applies to technical talks or teaching or even
just explaining things to friends. And I'm happy that you're here talking to us because I think
volunteering is very much a communicable disease. I hope so. It leads to more volunteering and
certainly sharing passion for engineering and science is obviously contagious. I mean, you fell into it.
I mean, maybe your story of lighting lights wasn't what made you say, I want to build things.
But it was a step on the path.
It didn't hurt.
Yeah.
And I remember when I was in college, it was after I had already decided I wanted to do science and engineering.
But a woman from Mattel came and talked to our SWE chapter, Society of Women Engineers
chapter, and she brought us Barbie dolls because she worked at Mattel.
And she also brought us razor blades.
That's right.
Barbie dolls and razor blades.
Maybe my new band name.
But then she had us actually take apart the Barbie dolls.
And she showed us how injection molding worked and how the knees, why they click.
I mean, you know, Barbie doll knees, tick, tick, tick, tick, when you when you bend them and but if you take out the the x the not exoskeleton the inner skeleton and you remove all of the plastic skin she's a great little
cyborg under there it was the first time that i fell in love with barbies maybe i should be adding
motors to barbies i when the first time i fell in love with embedded systems was I had a Barbie doll head sitting on a motor and the motor started working and Barbie started spinning.
And I think it was the same Barbie doll head that I'd kept through college and through my first few jobs.
And I was just like, this is the best thing ever.
So, yeah, yeah, maybe a few barbies. Not just for destructions.
Well, it sounds like the students will have an incredibly full day, as will you.
And you're still looking for people to help out? Yes, yes, definitely. I mentioned that we have
a group called Code Chicks that's helping a lot with volunteers, but I think we still need more.
And hardware, software?
You don't really need to be an expert in anything.
It's nice if you know something about hardware or something about software.
Of course, both is even better.
But of course, we're explaining everything from the beginning. So if you can keep up with the girls, sometimes just having another set of eyes
looking at the code or looking at the circuit is what it takes. I just saw a wonderful tweet from
someone. Was that from you? I remember seeing a tweet a few days ago about somebody who has a
code bearer up on the wall for students to explain
their problems to before they go and talk to the professor. Yes, yes, that was me. That was you.
That was wonderful. What a wonderful idea. And it's true. I've so often I've explained a problem
to somebody who doesn't really know anything about the problem. But just having that extra
set of ears sometimes is enough. You know, that's, that's all it takes to solve the problem.
Well, yes, I've often found I'm, I'm lost in a sea of, oh my God, I'm never going to fix it.
This bug is horrible. And then I sit down and I type an email to someone and explain all the
problems. And I start to think about what would this person
tell me to do so that I can answer all of the questions ahead of time. And a few times, I don't
know what they think, but I've sent emails to the people I was good at. I have fixed the bug and my
mental voice of you helped me. So thank you. And you know, what do they think when I say that?
It's true. I type so many emails and bug reports that
I never actually send. I never actually filed because the process of gathering all the information
so that I don't look stupid when I send the email is enough to solve the problem. Why I didn't
gather that before I started the email. I don't know, but no, because you had exhausted what you thought in your small framed world.
Once you started framing it as somebody else thinking about it. I don't know, it's still you,
but somehow it just leads to more possibilities. Yeah, better advice. Yeah, I think trying to think
in trying to put yourself in the place of someone else looking over your shoulder makes you think differently.
Yeah.
So volunteers for this program sometimes just need to be another set of eyes who know the same amount as the girls,
but they're just looking over their shoulder and saying, oh, that's actually plugged into pin six and not pin seven.
And if you're a volunteer, you'll be learning a lot of this too.
So that's kind of cool.
Right, and almost certainly you will go home
and order yourself an Arduino afterward.
They're so cool.
And as my mom used to say whenever I had plants as a teenager,
when, where, how much will it cost, how long will it take?
Give us some details, please.
Okay, well, the program is on June 26th,
which is a Wednesday. And that's just your workshop? That's my workshop. Get Set is all week.
Okay. And it's at Santa Clara University, which is in naturally Santa Clara. It's free. Of course,
it's free to the volunteers. Sometimes we pay for parking. You can get free parking, but they ask
you to pay for it if you can afford it.
And it's free to the students too, which is great.
That's something I love about the program because summer camps can be so expensive and they're not available to everyone.
And is it all day?
It's all day.
It goes from 9 o'clock to 4 in the afternoon.
You can volunteer just in the morning or just in the afternoon.
If you volunteer all day, you get lunch. And you get to get the whole view of what you've
already taught. So that's kind of nice. It's a lot more rewarding to volunteer all day because
if you volunteer only in the morning, then you don't get to see the projects at the end. And
if you volunteer only in the afternoon, you don't get all the introductions, so you don't learn what they're learning.
So if you want to volunteer, there will be a connection on the website.
You can contact us at show at makingembeddedsystems.com.
You can contact Akana directly on Twitter, and I'll have her linked up on the show notes. Or it's at A-K-K-A-N-A.
A-K-K-A-K-A-K.
Auk-auk.
It'll be in the show notes, because that's...
Yeah.
Somebody's squatting on at Akana.
Okay, but you can just search for Akana and probably get to it.
Yes, that'll probably work.
All right.
Thank you for telling us about this opportunity,
and maybe next time we'll talk more about that motor shield
and how to get it really cool and running and cheap
and available to everybody who wants it.
Yeah, that would be great.
Let's get some rovers running around.
Thank you so much for being here.
Thank you for having me. It's been great.
Thanks also to our producer, Christopher White.
Please leave comments for the show at the comment link on embedded.fm
or, again, show at makingembeddedsystems.com.
If you send an email there and it's for Akana, I'll pass it on. Don't worry.
And if you enjoyed the show, please, please leave a short review for us on iTunes.
The whole contagious passion thing helps even for fledgling podcasts.
Thank you so much and have a good week.