We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Hardware Hacking: You can be a Maker

00:00

Formal Metadata

Title
Hardware Hacking: You can be a Maker
Title of Series
Number of Parts
66
Author
Contributors
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language
Producer
Production PlaceSan Antonio

Content Metadata

Subject Area
Genre
Abstract
There is something fundamentally satisfying about building things that bridge the gap between your code and the physical world. This father/daughter duo will show you how they've bridge that gap. I frequently find Rubyists that are interested in tinkering with hardware but are often intimidated by the idea. Turns out, it is so easy even a grown-up can do it. In fact it is easier than it has ever been. And the best part is, you can use little Ruby.
26
Thumbnail
44:21
Computer hardwareHacker (term)MathematicsLine (geometry)Computer hardwareProgrammer (hardware)Multiplication signComputer animation
Computer networkRadiusGradientMultiplication signBuildingMeeting/InterviewComputer animation
Rule of inferenceMereologySpacetimeComputer animationLecture/Conference
Degree (graph theory)Student's t-testBuildingOvalComputer iconComputer animation
Stiff equationSet (mathematics)Maxima and minimaComputer animation
NP-hardMultiplication signOnline helpProjective plane
Right angleComputer animation
Computer configurationRight angleShift operatorComputer animation
Particle systemLecture/ConferenceComputer animation
Projective planeKey (cryptography)Right angleArithmetic meanComputer animation
FamilyBuildingRoboticsProjective planeConnectivity (graph theory)Open set
Digital photographySystem call
MereologyRight angleMultiplication signGoodness of fitComputer animation
BuildingFormal languageOffice suiteShared memoryVirtual machine
Lemma (mathematics)Hill differential equationVirtual machineArmReverse engineeringFrequencyWordComputer animation
Virtual machineBootingCuboidOffice suiteSelf-organizationGame controllerComputer animation
Computer hardwareMicrocontroller
Digital photographyProjective planeEntire functionBookmark (World Wide Web)Right angleComputerProgrammer (hardware)FamilyDegree (graph theory)Metropolitan area networkComputer animation
Integrated development environmentPower (physics)UsabilitySource code
Control flowComputerRight angle
Order (biology)ComputerMachine codeComputer animation
Convex hullComputerComputer clusterNP-hardMathematicsPersonal identification numberMereologySystem callProjective planeMachine codeLine (geometry)Scripting languageVapor barrierOcean currentQuicksortComputer hardwareComputer animation
Programmer (hardware)Computer animation
Euclidean vectorWindowConvex hullHill differential equationComputer fileWave packetYouTubeSelf-organizationGroup actionWordRight angleConnectivity (graph theory)1 (number)Grand Unified Theory2 (number)YouTubeComputer animation
Digital photographyBuildingEuclidean vectorSurjective functionSineElectronic program guideArmComputer animation
InternetworkingMereology
Game theoryComputer animationMeeting/Interview
QuicksortMultiplicationProjective planeOpen sourceComputer animation
Lecture/ConferenceComputer animation
Computer animation
FirmwareFamilyKey (cryptography)ComputerQuicksortSoftware development kitWordComputer clusterComputer configurationComputer animationMeeting/Interview
Hill differential equationHash functionBookmark (World Wide Web)Computer fileOffice suiteComputer animation
Bookmark (World Wide Web)Maxima and minimaHill differential equationCore dumpComputer clusterMultiplication signComputer animationLecture/Conference
Bookmark (World Wide Web)WindowVideoconferencing
Transcript: English(auto-generated)
It's so easy, can we get started?
There's a joke. We have an audience. If we don't, then the audience will get bored.
Is that a joke? Yeah! Alright, so let's start on a joke. Oh, I remember when you told me. There was one. How many programmers does it take to change a light bulb? Zero, that's a hardware problem. What exactly is a cue?
A cue is a letter with foreign lines behind it. That's okay. I can tell who the clue is, especially for anyone who I've been on for the first time.
I'm Nia, I'm in fourth grade. I really like gymnastics, I like to build things. I'm Chris, I really like watching gymnastics. I like building things with my kids. I work at a company called Radius Networks.
We build all the things we get, and we happen to be hired at the time and work in this amazing building in Georgetown, D.C. When we talk about full stack there, we talk from rail services all the way down to printing circuit boards. Today, we are going to talk about building stuff.
What things do you like to build? Tardises. Tardises? Okay. How many tardises have we built? Two? Alright. Isn't that a little too many? No. No? What else should we build?
How about another tardis that actually works? You're saying my tardises don't work? Yeah. I think they work just fine. Well, they don't travel in space and time. Fair enough, they don't travel in space and time. We're going to need something a little more than our we know to make that work. So, a little background first.
When I was her age, I used to watch these shows on Discovery Channel, where they would take students and they would build contraptions around a ride and drive down the building. And I remember watching these shows and they would talk about that with engineering, and that was basically my reasoning behind going and getting an engineering degree. It was because I thought we were going to build paper contraptions
and throw eggs on the roofs. So, for a long time, I've liked to build things, and I found it a lot of fun that now that I've been doing this and have kids that are doing it along with me, it's just a lot of fun and very rewarding. So, we like to build things, and I think this is important.
One of the things about building things is it sets you aside from a lot of the other people out there. Do you remember that guy that drew cartoon boxes? Oh, by the lucky stuff. Not stuff. It's stiff.
I know that doesn't make as much sense, but by the lucky stuff, I had a great quote. He says, when you don't create things, you become defined by your tastes rather than your ability. Your tastes only narrow and exclude people. So greedy. Let's build some stuff, all right? Okay. So, let's build things.
That sounds kind of hard. It's going to be hard. You will get stuck. Yeah, I think most people get stuck one time or another. You will need help. I know I need help. You will break things.
Have you ever broken anything? Yeah. You will die. Most people do. Well, hopefully, it'll be a while. Not related to our projects.
Okay, before we talk about that, I want to say a little story. When we think about the worst thing that can happen, back when your mom was in college, she got a car that had one of these, a stick shift, and she didn't know how to drive it. What? No.
I know. I'm just surprised it's you. Despite how good she is at driving stick now, at the time, she couldn't. So, we went out to a big, empty parking lot and, like, way in the back, where there was nothing around at all, I had her step on the clutch, put the car in gear, and I told her, just take her foot off the clutch.
And you know what happened? What? It blew up the umpire? No, the car stalled, and she had to restart it. And that was it. So, that's just kind of, like, remember, not much bad things are going to happen. All right.
We're going to break things. You cool with that? Yep. All right. So, what's the worst that's going to happen when you wire up one of our shifts at all? You're going to let the magic smoke out. That's right. And then you see a little,
and the smoke comes out of it, and you have to go buy a new working vehicle. But that's, like, how much did the wheels cost? You remember? 20, 30, so. Yeah, it's not too much. That's not a new vehicle. So, we're going to break things.
And that's cool. You can do this. You just need to know how to get started. All right, first step. I think one of the first projects you worked on where you just fixed something that was broken. So, you remember this thing? Yep. All right. Can you tell everybody what was wrong with it?
Well, the car key didn't unlock the car. The car key did not unlock the car this way. So, what did that get you? A screwdriver, battery, and a car key. That's right. And what did you do when you wanted to get started with that?
Well, you had to find a little screw, unscrew that. Then you would take off the top to take out the battery. And then you would put in the new battery, put it back on the lid, and screw it back up again. Hopefully that works. Yeah, and if it doesn't work, what was wrong with it?
You'd probably put the battery upside down. That is solid trouble-keeping advice. Okay. So, are we going to worry about the stuff we're building with? No. No, it doesn't matter. We have Arduino, Spark, Tesco, Raspberry Pi, Edison,
really awesome $400 Lego Mindstorms. Those are great things, but let's not worry about it. Let's just start with cheap components and just make something work. All right. Let's not worry about what project we're going to build. If you're just getting started, it really doesn't matter.
You don't have to be automating your house. I think your brother wants to build a little robot in the room. That's a little advanced. So let's not worry about that. And let's not worry about the tools. So is this what you learn to solder with? No.
But that's a pretty awesome one, isn't it? Yeah. Luckily, we don't need an $800 soldering iron to get started. What we used was just a little cheap Radio Shack soldering iron, which I think you can get online for like $8. And that did just fine.
So let's start simple. Persistence is more important than having this one. Yep. What do I always tell you the most important part is? To try hard. Right. And it doesn't really matter. All right. So the first thing you built was this. What? No, I didn't build that. That was complicated.
Yeah, schematics have a knack for making things look more complicated than they really are. But that is actually what we built the first time. We started with a kit. It was pretty easy to use instructions that were probably translated by somebody who didn't speak English as their first language. But we followed them.
And can you tell them what this is? So this is the useless machine. So some of the parts, there are two switches. We'll show them to you. Okay. I'll have you pull my camera over.
All right. Awesome. So here's the useless machine. Can you explain the different parts? So there's the switch. There's the motor, so the yellow little brick in there. There's another switch back there.
There is a battery pack, an arm. So that's the switch. All right. Can you tell them how or what happens when you flip the switch? So you flip the switch, which turns on the motor, which triggers the switch, which triggers the arm to come up
to push the switch, and then it reverses. The motor reverses. And then the motor comes down to push the switch to have the arm come down. And then it turns off. Can you explain it like that? I think the schematic is in the way.
Can you show everyone how it works here? Do you want me to? Okay.
What was the most fun about building this little project? Probably afterwards when you got to just play with it from now on. It doesn't do much until you get bored with it. Not really. Did you have any problems when you were putting it together? We put the plate on backwards.
The mounting plate inside? Yeah, so it pressed the boot. Yeah, we couldn't fit the box together. So we had to take it all back apart and put it back together. Yeah. Well, we figured it out.
We built the project, and now we want to move on to controlling, like working with a microcontroller. I'm going to start with an Arduino. I think a lot of people are familiar with these little microcontrollers. You can get them for not very much online. And we're going to just turn on an LED. Turning on an LED is totally the hello world of the hardware world.
So the first thing that we did, we decided since we were going to make a project just to turn on an LED, we needed to come up with a whole entire project around this. So Lee and I do what Lee and I do, which is we build a TARDIS.
This was your Halloween costume last year, right? Well, my brother built the costume last year. Yeah, because he was which one? He was the TARDIS. That's right. And you were? The doctor. Which one? Matt Smith. Which is your favorite doctor? Matt Smith. Fair enough.
And being a highly trained professional programmer with degrees in computer engineering, I did what you would expect me to do, and I Googled for an Arduino sketch and paste it into a little IDE. And all this does is step up the power that's going to the LED
so it fades in and out into the light on the top of the TARDIS, which created the nap, which worked amazingly well when we were trick-or-treating walking down a dark room.
So if we could turn on an LED, now we want to control a relay. Can you tell everyone what a relay does? So a relay is anything that you could turn on with a switch. Yep, a relay is basically a switch that a computer can control.
And if you look around you, everything has a switch. That's right. Everything has a switch. So what can we control with our computer? We control everything. Right. So we start playing with the relays. We were using a Raspberry Pi. And we use a little gem out there called Pi Paper.
So this is all the code you need in order to get a relay to flip right off. But Dad, what about controlling the computer? Oh, if you want to control the computer and everything around it? Well, then we need to detect the button press.
So if we want to detect a button press, this is us telling the computer something, not the computer controlling other things. So we get to push buttons? We do get to push buttons. Turns out, hey look, see what it's calling.
It turns out that this is all the code we need. So we're just going to set up a block and watch a pin, one of the pins on the Raspberry Pi. And when it changes, you get a call back and you can find out what the last value was and what the current value was.
Now this is a little oversimplified. If you're going to set up a Raspberry Pi to detect button presses, you will also need something that's going to start your script. You'll need an event. You'll have all of the different moving parts of Linux. You'll need something to launch it and make sure that you load your gem and this sort of thing.
But once you get all that working together, you only need these four lines of code to get it to work. So what have we built now that we have a button and a relay and Linux and InstaGrips and all that working? We've built a light switch. Yes, we've essentially built a light switch. That was easy. Yeah.
So let's talk about some of the big scary barriers to the things that people find intimidating about when you're working with hardware projects. Were you scared of soldering in the first minute? A little.
Is it that bad now that you know how? No, I'm sorry. So we're scared of programmers carrying a screwdriver, so what's going to happen if they're carrying a soldering iron? What could possibly go wrong?
Alright, let's give them a quick couple of steps when you work with a soldering iron which you need to do and then we'll show everyone how to do it. Okay, step one. Get all of your stuff and plug in the soldering iron. Yep.
Step two. Prepare the soldering iron. Step three. Heat the components.
Alright. I didn't quite have the guts to ask the organizers if we could have toxic metals in the soldering iron. So we're not going to actually do this, but Leah can walk through how it works.
Okay, so first you have to bend the soldering iron. So you take the solder and touch it to the tip of the soldering iron. Then you can wipe off any extra solder.
Sometimes you put that off because this doesn't want to come off. Sometimes if it's a bunch. Get it off. Then you heat the component. You would put on the solder on the other side of the component and hold it there for about a second.
It should run around. And one thing is don't heat the solder because the solder will shrink
and that won't work out very well. Yep, and these are the ones that you actually did, aren't they? Yeah.
So being a highly trained professional engineer, and despite Leah's amazing demo, you should do what I did to learn to solder, which is watch YouTube.
There's not much to it. The main trick is learn to heat the component. You'll watch the solder wick right into place if everything is working right. You shouldn't be fighting with it or trying to get it to stick, anything like that. There's great guides online. I like the one on the website called SparkFun and it'll show you a couple of guides
and give you some references on what the solder should look like when you've got it right. And as long as everything is heating up, it just kind of wants to work for you. So it's not that bad.
So let's go through a couple of reminders. Let's recap a few things. You can do this. You just have to learn how. And is learning it that hard? No. We have like a whole internet chart and you just have to do these things. It won't be easy.
That's what makes it awesome. It's easier if you start small. Easier, not easy. All right. And that's what really is the fun part about this. It's something that you know that a lot of people
would have tried and then just kind of given up and put the Arduino in the closet and not worry about it ever again. All right. So thanks, but before we go, we have a couple of quick things that we'd like to mention. Firstly, I was going to give her a plug for.
Okay. So I go to the YMCA Gymnastics gym. We really like it there. So any little guys that want to do gymnastics, this is a good place to go. Yeah, if you have little guys that want to do gymnastics, this is a good place to go. We really like it there.
Another thing is they help organize a conference called Ruby for Good, where we have a multiple day hackathon for adrenaline projects. Mostly non-profits, open source, that sort of thing. We work on a lot of awesome projects,
including the things like the Humane Society, Purple Door, people who are hacking on our spec, and other open source things. Everybody gets together and we have a great time. This year it's going to be at the Smithsonian George Mason Wildlife Conservatory, I think is what it's called, in Front Royal, Virginia.
I think there's one thing that you should think about when you're going to pick which conferences you're going to next year is, just ask yourself one question, and it is, will there be red hands?
And finally... So if anybody wants stickers or wants to trade... Leah's trying to get, how many of the stickers would you like to get? All of them. Tell the stickers. So she's trying to get all the stickers, which would be very impressive, coming all from RubyConf. So if you'd like to trade, Leah has stickers and would be happy to trade.
All right, thank you.
Or from scratch. It was okay. I think it was like $30 at Micro Center. What's your favorite thing you've built so far? From the Useless Machine. When you ask your friends,
or you tell your friends that you built the Useless Machine, do they believe you? Um, some of them. So not all of them? Yeah, but when I brought it into the shares, that means there is. Once they actually saw it. Yeah, so the question was, I use PyPiper when I'm working with Raspberry Pi, do I use other gems with the Arduino?
Yeah, I've used RTIM, and they have a firmware called Fermata that you can load on it, and it will basically give you an API. And that's great as long as you have a computer, it's still required for the computer to kind of talk to it, to host the Ruby. Often I'll do that with a Raspberry Pi or running the Ruby that talks to an Arduino.
How do we come up with the ideas for our projects? Um, well, some of them, so for the Useless Machine, my dad was online looking for a kit for us today, and for us that was one, and with my mom's car keys,
they come to our car keys. So finding stuff to fix, and also it's just hanging around and chatting with Leanne and her brother and finding things that will be fun for them that they want to do. Have you thought of combining your love of building things with your love of gymnastics? No.
No? No. You should. What is the next thing you want to build? Um, well... Besides a tardis that actually works? Um, I want to build a gymnastics.
Oh yeah? Yeah, I've always wanted to do that. What did the tardises do and how did they work? Okay, so one was a Halloween costume. My brother, he sort of had to, um,
like, move it, but, um... Is this working?
We built a Murphy bed that looks like a tardis in my guest room. And it works as a bed. But that's not as fun. As you're traveling in time and space?
Anyone else?