 Okay, we're to go ahead and get started. So this talk is, as you can see on the screen, this is Arduino's for a dumb software guy. So it's hardware hacking for a dumb software guy. I definitely include myself in this group. I've done software for a long time, but I've never really gotten into hardware. So this is how I got into it. This is about a way that all of you can get into it if you're looking for a way to do it. Just as a disclaimer, if you've seen other Arduino talks, there may be some things that are similar. It's because it's all true and good, and I thought of it first. I guarantee it. So again, back to Arduino. So hardware hacking, it can be daunting for software guys like me. So I look at it and I say, you know, there's these complex circuits and components that I didn't understand or even don't understand a lot of them still. There's the cost involved in getting into hardware hacking. So you have the, you know, you have to buy a development kit. You have to buy all these tools, soldering irons, test kits, things like that. So you look at just the enormous cost you have to put down to get involved in this. And then there's also, in many cases, a steep learning curve. So, you know, you're trying to learn assembly or something like that, these languages that may be hard to learn. There's also, for a lot of the stuff, there's a lack of good information. So you look, you try to find, you know, good tutorials on things, and sometimes it's hard to find something that's equivalent to, like, an example in code where you can take it and, you know, modify and use it however you want. But I still wanted to make cool stuff, and so I started looking around. So one thing that really helped me is last year I picked up the hardware hacking kit that they sold here at DEF CON and had a parallax board that was, that's a really cool board, by the way. And then the other thing is I started just hearing about these Arduino things, just reading on Hackaday and the Make website and things like that. So I picked up a couple of Arduinos and just started messing around. And so this is why, this is why, like, Arduinos and microcontrollers is they're a good mix of hardware and software. So you can, you can drop code on them and they can do the same thing as a really complex circuit, but they're just on this one little chip. And so they're really easy to use and you can reprogram, repurpose them for something else. It's not like a circuit where you have to desolder everything, resolder it up. You just drop different code on it, it's something else. And I really like that. So if you look at this graph, this is a, just a graph that shows the search, the amount of the people that are searching for these different terms. So if you look at the green and the orange are Atmel and microchip, and you see over time, so these are two big chip manufacturers that are used a lot, especially in the industry. And in fact, the Atmel chip is on the Arduino. But so as you can see, the people have been searching less and less for these terms, but Arduino, the red one, has been going up since it came out in 2007 or so, then it's steadily been rising and it's passed the other ones, and it's going to, as far as I can see, it's going to continue to rise because it has so many, so many great advantages to using Arduinos. So what is an Arduino? If you're not familiar with them, they're open source hardware platforms. It's an open source hardware platform. It's an all-in-one solution. So it's open source, meaning the design is completely open source. Anybody can download the schematic. You can build your own. You can sell them. You can do whatever you want. It's completely open source. It's all-in-one, like I said, so that means basically you have everything you need on the board. So you just plug a USB cable into it and go. You can just drop code on it. It has an easy-to-learn language. The Arduino language is kind of an abstracted C. It takes care of a lot of the functions for you, like digital PIN writes and things like that. They're really easy to do in the Arduino language. It has a free open source ID that does syntax highlighting. It uploads the code to the board. It compiles it. It can burn new bootloaders on just blank chips, things like that. So it's really cool. It has a strong community backing. There's a ton of people doing stuff with Arduinos all over the place. And there's great forums, things like that. Also they're about $30, so they're not for the typical one that most people use. So they're a really good deal and they work really well. So to me, it's kind of like the hardware equivalent of a scripting language. So you use a scripting language to get things done fast, to get things done easily. Scripting languages have disadvantages as well, though, right? They may not be as fast as a compiled language. You're going to have certain trade-offs. You're going to see the same thing with Arduinos, but they're good for a lot of stuff. So this is a picture of an Arduino. This is a De Milanovi, which is 2009 in Italian. This is the latest one that the Arduinos guys came out with. It so runs on a Mega328P chip, has 14 digital input output pins, six of them with modulation, which means they can kind of be analog out, so they're not all the way on or all the way off you. They go on and off so fast that it looks like they're part way on. And they also have six analog input pins where you can read an analog value, 32 kilobytes of flash, and they run at 16 megahertz. And so what else is an Arduino? Like I said, these are open source boards, so a lot of other people make them. Some of them are fully compatible. Other ones are just IDE compatible, which means you can drop the code on them, but they may not be, you know, they may not be exact same shape, which we'll talk about why that's important in a minute, but so there's like the Arduino Mega, which is just a big Arduino. There's a SparkFun makes some, the Arduino Pro and Mini, and others that they make that they're the same shape. They don't have the FTDI built onto it, so you have to have a separate FTDI cable. EvilMats scientists, they make one free deuino, seed deuino, or other clones. Then there's some other ones that have extra functionality, like the FiO has some wireless capabilities on it that other ones don't. The Tinsi is partially Arduino compatible. There's been other talks about the Tinsi during DEF CON, but it does a lot of USB stuff that's really cool. Lilipad is used for embedding and clothing. It's a round Arduino. Arduini and bare bones are these really, they're just bare bones Arduino, so there's just not much to them. It doesn't have a lot of the extra components. And then the Maple is really cool. It's an arm-based Arduino, and so it runs like 10 times faster, but you can drop the same code on them, basically, and there's other ones that are also doing arm-based Arduinos as well. And the Butterfly Uno is actually on a FPGA card, so it emulates the Atmel chip on the FPGA, and you can add input and output pins on the fly. It's just pretty cool. So Arduinos, they're general purpose platforms. You can make whatever you want, literally, with these things. This thing, I guess, when you fart, it changes the channel, so kind of funny. So I made things, like I made a little autonomous robot that avoided walls. That was my first project. It took just half a couple of hours. I made my daughter's Halloween costume with a stop light that changed shapes, things like that. So you can make all sorts of things with these. People are making cool stuff. So like I said, they're not for every project. They're expensive when you want to make a lot of something, so if you want to manufacture a thousand of something, 30 bucks a pop is pretty expensive. You probably just want to go with the chip itself. They're not incredibly powerful. Like I said, people are doing cool stuff with these, but they're doing, like you can do a ton with them, but it's not a computer, and also there's no parallel computing. They do have interrupts, though, so you can interrupt what you're doing and switch to something else. So in hardware, generally the first thing you do is the equivalent of Hello World, is to blink an LED. So here's the code to blink an LED. So I just define my LED pin to be pin 13, which on the Arduino board that actually has an LED on, like a surface mount LED there, so you can test it and do things like this. Then it just has a void setup function, and this is just the function that will run one time when the Arduino first starts up, and then it goes into this void loop where it's just going to keep going through this over and over again until it loses power or something happens to turn it off. So in this one, I'm just doing a digital right, which is going to make that LED turn on. I make that LED pin high, so I'm just going to give it power. I delay for a thousand milliseconds, which is one second, then I make that pin low to another digital right, and then I delay for another thousand milliseconds. So it's pretty easy to make an LED blink. So now I just want to talk a little about shields. So shields, they fit on top of the Arduino as long as it's shape, this same shape. That's why shape's important. It adds extra functionality, and many are stackable, so you can stack one on top of the other. So here's some available shields that are pretty cool. So you have the Ethernet shield, which gives you Ethernet capability, XB gives you radio stuff. Motor shields that you drive. Motors, wave shields, you can play waves. Nixie tube shield, that's this guy up here, so this lets you drive Nixie tubes. See if you haven't seen them, they're a really cool display, so it has all the numbers kind of layered on top of each other, and then it just lights up the one that you need. I've been wearing this around as a badge a little bit, but then there's, but it runs like 90 volts, though, so I'm a little bit scared of it, but I still keep doing it. Then there's an LCD shield, so you can see LCD stuff. There's a cellular shield, so you can put a SIM card in it. You're on the cell network. You can program there. The advantages of shields, for the most part, unless you buy it as a kit, there's no tools necessary. You just pop it on and you've got that functionality. For example, here's the Ethernet shield, so you just pop it on. In hardware, it can support up to four simultaneous connections. It has the TCP stack on hardware on the shield itself. And so there's one thing you can do pretty easily. This is just a simple port scanner. So you define the IP that you're going to scan by putting in an array, a four element array, so I just put it in there. So I'm just going to scan this subnet 192.168.1. And then I just change that last octet every time I go through the loop and then scan ports, or just try to connect to ports one to 1028. Then I can report that however I want. I can log that to an SD card. I can transmit that somewhere else. So if I want to put this on a network and then leave or something like that, then I have this really small device that I can use to be a port scanner planet somewhere. So here's the XB, it's 2.4 gigahertz, 250 kilobits max data rate, 128-bit encryption, and it can read from a few hundred feet to several miles in range, depending on the model that you get. So XBs and security, so one of the reasons I like XBs is they can be used for out-of-bank communications. So they're a 2.4 gigahertz wave, but it's not 802.11, and so you're not likely going to see it like in a wireless assessment. So if you plan this somewhere, it's maybe going to go and detect it for longer than a computer or something like that using a typical wireless protocol. You can also use these to reprogram your Arduino remotely, so if you can plan it somewhere, you want to change the functionality of it, you can maybe plan it somewhere it's doing one thing that's good, and you're putting it as a Trojan or something like that, we want to change the functionality later, you could do it. And we're also looking at using this to do triangulation for wireless assessments. So say you're trying to do a wireless assessment inside of a building, you're trying to figure out where that wireless signal's coming from, then we're looking at putting these around the building and being able to detect that way by triangulating the signals and the power they're getting from each of them. So here's the XB shield and the Ethernet shield together. So like I said, this is a small device. When you put these together, then you can put it inside of a network device. I'll talk about that a little bit later with the Cisco router. And you basically have this remote device you can use. So here's a picture of my Nixie tube shield, since you guys probably can't see it up here, it's kind of small. So right now it's just counting down. Everyone asked me what it's counting down to when they see me, and I don't know what it is. So one guy who was in the vendor area was getting down to like 10, 9, 8, and he was getting a little scared, it seemed like, but it just starts over. But anyway, it's kind of fun. It's a really cool little display. So then the next thing, after you use the available shields that are out there, the next thing I thought about is, OK, I'm going to start making my own shield. So you can either use what's called a prototype shield where it's a shield that just has a bunch of holes you can solder into and use like that. You can use a custom PCB where you draw it out, send it out to be manufactured, you make it yourself. Or you can use a multi-purpose PCB like a perf board, which is what I tend to use just because they're cheap and I'm lazy and they work well. So you're going to need a soldering iron, possibly other tools if you're going to be making your own shield. And one thing I want to say about soldering irons is if you're having a hard time soldering, just try it with a decent soldering iron because that was the difference for me. I was using a cheap Radio Shack 1 in it. I sucked and now I can actually solder because I got a decent one, so. So reading from pins, so digital reads, they're really easy. So you use the digital read function, you're going to get a one or a zero if the signal coming into is higher or low. With an analog read, you're going to get a value between zero and 123 depending on what's coming into it. So one thing that you want to think about any time that you're hooking into an external device is that it's kind of like the form's in a web page. So you've got these inputs and you can start just pushing weird stuff to them and seeing what happens. And it's kind of fun stuff happens. We've seen other talks about doing things like USB fuzzing, so you just start sending it crap or trying to tell it you're a different device. And a lot of these interfaces aren't as well protected as the front door is. And so this is a good opportunity to use these hardware platforms to do hacking stuff. So here's one little project that I made. This is one of the first things that I did. It's a lie detector. So we're going to be running a little bit of voltage shoot people to do this, so be careful. This is just a little bit so it shouldn't hurt anybody. So anyway, so the wire, you basically take, you have two wires, so you hook, you take a wire, you put tin foil on the end of it, you wrap it around your finger and then I just use tape in this picture. You can use Velcro or something like that as well. You plug one of them into 3.3 volts and then you take another one to another finger, you plug that into an analog reed, use a 10-kilometer resistor as a pull-down to help you get a good accurate reed. So from the analog reed to ground and then basically, basically the way it works in it, so you've got a piece of tape on one finger with foil, with a wire coming off of it, going to power. The other one going to the analog reed and it just is going to send voltage through your finger basically. And if you're lying, typically you'll start kind of sweating a little bit on your skin and so the resistance will go down so the analog value will go up. And so that's kind of the way this really simple lie detector works. So here's the code for it, really simple. I'm using the analog reed pin two, then I'm just doing a serial begin. This is just a function that lets me output whatever is happening on the Arduino over serial. I can just do serial print, which then I do down the void loop so I do a serial print of whatever I read in through the analog reed. And then I delay for five seconds and it's just going to keep reading and so I can just watch that value go up or down. I can know what's going on. It's not perfect. Any emotional response will actually trigger you sweating like this so if you're mad about what the person is saying or something like that then you're also going to look like you're lying to these lie detectors. And also the professional ones all have things like they test for heart rate and breathing rain and things like that. So here's another one that there's a ton of people who make different versions of this. So all you do is take a laser, you put it across a doorway and then on the other side of the doorway you have a photo resistor that the laser is pointing at. So when someone goes through that, that laser is going to change the value that's being read on that analog reed to that photo resistor and it's going to show you that someone went through and you can buzz or do whatever you want to trigger on that person coming through. Here's one that the follower talked about yesterday that he did, which this is one of the first projects that I made as well actually going off of his plans. So this is based on the AVR project VUSB. So it's a simple circuit. It has just three resistors, two diodes and then just the USB connector and that's it. And you can emulate a HID device. So you can do a keyboard and then when you plug it into a computer it's not going to need any drivers, it's just going to work. And it can be modified to be like a joystick or a mouse or a lot of other devices. So security uses for this. There's been a couple other talks, Adrian Crenshaw and then Follower, they talked about this a little bit. Doing things like proof or doing things like you connect it to a computer and then when a person comes and logs in, then it can, while they're turned away or something like that, then it can add a user really fast without them noticing. Another use that I thought about using it for was you hook it up to a kiosk, a computer that's in a kiosk mode and have it just go through all the possible combinations of keys and try to break out of that kiosk mode. Typically in the past a lot of kiosk modes have special keys that they forget to exclude from being able to get to things in windows or something like that. But check out, like I said, check out Adrian's or Follower's talk about this as well. They did some good stuff. So here's the schematic. It's like I said, it's really simple. It's these three resistors, two diodes and then the USB connector and then to the Arduino. And then the code. Basically so you have to disable the built-in tires in the Arduino because USB uses different timing. And then you just connect as a USB device and you just start sending keystrokes. So it's super easy to do. The next one that I decided to do is I thought, or one of the ones I decided to do wasn't next after that one I guess, but at some point in my life I decided to try to make an RFID emulator. It was actually, part of this was because I wanted to get Chris Padges from, that he was supposed to make after last DEF CON, but he never came out with it. So I thought, well, I'll see if I can make my own and see how hard it is. So I wanted to emulate 125 kilohertz RFID tag. I didn't have an oscilloscope or any kind of antenna tuning equipment and I didn't have any plans to do it. So there was no, here's how to make an RFID emulator with an Arduino or anything like that. There's some similar projects that gave me a lot of help, but there was nothing like right there so I could just take it and use it. And so this is what I ended up coming up with. So this RFID tag spoofers, stupid, simple. And in a pack of day in May, I ended up picking it up and doing stores on it. So all it is, is just a 10-kilometer resistor, a transistor, a 10-nanofarad capacitor, and then a spool of wire, and I spent real little toilet paper, so. And that's in the code just 20 lines long, so it's really easy to make this thing. So I'll actually demo it here in just a minute, but here's the schematic, so you have, and it didn't take me very long to figure this out either. I mean, I think it was like six hours or something like that, so these are actually really easy to make. So it has the resistor going to the Arduino pin, then to the base of the transistor, then the emitter and the collector are connected to the coil, and also has that tuning capacitor that goes in between them. And so basically what happens is, I've wrapped this antenna so it's at the right frequency, and so the RFID reader sends out a carrier wave, and my antenna is tuned so that it will respond as basically a high whenever the RFID reader sends out the wave. But then what happens is with this transistor, when I put power to the base, it essentially connects those two ends of the antenna that are connected to the emitter and the collector. And so that detunes that antenna so it gives it a low signal, so it's really easy to make this thing work. So the code, so I just, I'm using pin nine, I just chose a pin, it doesn't matter which one you use. And I said it's going to be an output pin because this is the one I'm going to use to turn on and off the antenna to detune and tune it. And then I just started out as low. And then so the way that RFID works, I just got this off of Wikipedia, it uses Manchester encoding, so this just means it has the clock signal, then it has the data and they get XORed and that's what you end up sending back. So that way the clock and the data is in one signal back. You don't have to have separate ones when you're sending the data. So here's my main loop of my code. So basically I just defined my data that I'm going to be spoofing. So you have to send it a bunch of ones so that it knows you're a valid RFID tag. You're not something just keeping interference or something like that. And then you start sending it the signal. And so, and this one I'm just doing all Fs, so I'm just doing four ones and then the zero is parity. And at the very end there's all those zeros which is the column parity. So it has parity on the rows and the columns. And then I just call this function that I defined called set pin Manchester. And I just give it what the clock is and then what the data is and then it just does all the XOR stuff and it then changes the pin. And I delay for 256 microseconds so I'm at 125 kilohertz and then I just keep repeating. So you just set the, so here's my Manchester code. So as you can see there I'm just XORing the clock and the signal to get my man encoded in. And then if that's one I know that I should set that pin low because low is going to be high on the antenna because I'm not joined those two ends, get detuning the antenna. Or I set it high and that detunes the antenna and then I get my, you know, then it's going to give a low signal. So here I'll really quickly show how this thing works. So I'm just using, to demo this, I'm just using the parallax RFID reader that Joe Grand developed. He just came out with a new one that's a reader writer. And then here's my spool of toilet paper with wire. And you could just, the antenna just has to be the right tuning so it doesn't have to be around the thing of toilet paper. But that's just what was easy for me to do. So here, here's my code. And then, let's see. And that's the ID as well. Here's the, it has a built-in serial monitor so you can do serial stuff. So as you can see here, hold the tag up to it, it reads it. Hold another tag, it reads it. Then I'm going to hold this thing up and it's just doing all Fs, right? So I can change that code, I can modify it and it can do, it can output whatever I want. And so I can emulate any ID with this device. Okay. So now the next thing that I, well another thing to look at too is when you're building hardware devices is what other stuff can you interface with? And so serial is a good way to interface with things because it's really easy to do. A lot of stuff supports it. There's the digital IO pin zero and one or hardware serial pin. So they're easy to connect to stuff. There's also, so like this, this parallax reader uses serial, GPS units, use serial, LCDs, various integrated circuits, lots of stuff uses serial. And the second one is I2C which is, or I2C which is analog pins four and five are built-in I2C pins. This is what, this is a bus protocol so you can have up to 128 individual devices on this bus. And each device has its own address so that way you can interact with the one you want. So there's like the centipede shield, this is what it uses, which gives you a ton of IO, it I think gives you an extra 64 IO per shield and you can stack them. Also we numchuck, it uses I2C and I have an LCD that does either serial or I2C. So you can connect the Arduino to whatever device you want and try to send stuff over serial or listen over serial, see what's happening and figure out how stuff works. I actually use this to fix my neighbor's CGA hard drive, it looked like it was going dead and so I Googled and found it has a serial interface on the back of it so I was able to connect to it and change and reset the hard drive and that works perfectly now so it's kind of interesting that even hard drives have that on them. So like I said, we controllers and there's also an I2C scanner which will just scan everything on a bus, see what's there. So like I said, there's a parallax RFID reader. It's a serial device, it runs at 2,400 BOD really easy to use. Here's the code for it. So basically with this one I wanted to be able to use the hardware serial to report back to the computer so I ended up using the new soft serial library which gives me basically bit being serial so I can use any of the digital IO pins to do serial. And so then I set up my, so this is all the code right here so it's super easy to do. I include the new soft serial library. I tell I'm gonna use pins six and seven for RX and TX and then I start up my serial which is the new soft serial one and I set up my serial which is the hardware built in one and then I basically, what I do is anything that comes in from the new soft serial pins I just forward out to me so that's how I can see that up on the screen, things like that. GPS tracking device. So this uses a serial GPS unit, I got this off SparkFun. Can log data to an SD card or it can broadcast it out using cellular or XB or something like that. So you use it to track down stolen goods so I know people who have devices like this they put inside their golf bag or whatever and then if someone steals it they just go and beat them up or whatever. And then, and also can you see where people are? Like I have a cop lives next door to me he says that they put these devices on cars and they can track where they're going. They have to have, in Utah at least you don't have to have a warrant to do it they just have to have reasonable cause that there's something suspicious going on. But as far as me doing it I don't know if it's legal or not so. Another device is this blue smurf, it's really cool so it's a serial device. It basically replaces a serial cable with Bluetooth so if you have two Bluetooth on each side then it's the same as a serial cable between the two. So default data rates 115K. It can be used to program on Arduino if you just hook it up right and Arduino is programmed over serial so any serial device can be used to reprogram it remotely. You can also use it to communicate with other Bluetooth devices. So Foller talked about this yesterday as well so this is the blue smurf, this is a picture of a cop holding it where they found it inside of a, I think a pin pad of a gas station or something like that. It seems a little bit silly to use this one because I mean the range is so small it seems like you'd use an XP or something like that but that's what the criminals used. So people are saying Spark's Fun is bad because they made this device but it's just silly, right? Where do they find the device? I believe they found it at a gas station in the key pad so you swipe your card and you put your pin in. I believe that's where it was, something like that. So another thing, so one thing that's kind of fun to do with this Bluetooth is the Arduino and the Android project is called Armourino. So basically what this lets me do is I install this app on my Android phone then I put the blue smurf on then I can interact with my phone, I can make my phone interact with my Arduino remotely or wirelessly and vice versa so events on my phone can trigger stuff on my Arduino and stuff on my Arduino can trigger events on my phone. So it's a pretty cool little project, it's really easy to use as well with this blue smurf. Another thing you can do is you wire up to an iPod or an iPhone and then you can do serial commands too so you can do things like dump out playlist, you can do all the remote things. That's fun to do is just try sending just crazy crap and see what happens, see how it likes that. So another thing that I did is I put, so I used the XB shield and I thought it'd be kind of cool so I thought about two different things with a Cisco device so I thought well you could either put an Arduino with an Ethernet shield inside of it, maybe use Relay so that when you're not, when you don't want to attack something then it's working correctly and then when you want to do something with it you switch that port over so it's going to your Arduino and you can mess with stuff. Another thing that I did with this one was actually inside of this Cisco, inside of this Cisco router I've actually opened it up and I've soldered to the bottom of the console pins and then I hooked up a level shifter so I can use those because they're gonna run at a different voltage than the Arduino stuff is. So then I can actually interact with a console port over XB with my Arduino so I could, if I could get this into some company or something like that then basically I have remote access to their console or I could use it, I guess I could use it legitimately as well if I want to put a router somewhere I didn't want to go touch it actually then I could do that but. So here's the top, there's a picture of the top of it so basically the wires come up and then I just put my Arduino and stuff on top so. Another thing you can do is you interact, integrate it with a cell phone so I said you can buy a cell phone shield but I didn't seem as much fun as trying to do something with a cell phone itself so what I ended up doing is I pulled off the keypad of this cheap prepaid cell phone that I had and the keypad stopped working anyway from the top and so I just ripped the keypad off, the rubber stuff and then I just connected transistors to each of the button things on the cell phone. So basically I had a big ring on the outside and then a little circle in the middle so I just put a transistor between the two when I put power to the base that transistor it essentially makes that connection and so it pushes the buttons and I could connect these off directly to my Arduino but then that would use up all my pins I can do anything else with it so here's what's called a shift register which lets you shift out what you want it to do so you can do the high and low signals using these shift registers and only uses like four or five pins but I ended up using the centipede shield which like I said that's I2C so I just use these two pins which like I said it's a bus per call so I can use a lot of different I2C devices so essentially it doesn't use any pins to be able to do that so I communicate to remote devices interact with touch tone systems anything that I want to use a cell phone for I basically have can hit any key and do whatever I want so here's the schematic like I said it's just this transistor, the resistor to the base and then going to some Arduino pin and then the two piece of the cell phone button so I have a video of this I did not try I don't think I don't know what they'd say I can't see what's up am I hitting the play button? I'm just not playing though huh it's thinking fantastic I wonder if it wants me to okay well guess we're not showing that so basically all you see in the video is you just see the you see the cell phone and you'll be able to see I can push any button that I want on the cell phone and it just reacts like you would if you push buttons on a cell phone and you can use the same technique for anything that has buttons that you want to automate something that it does so you can do this with like a game controller here's a close up picture of the cell phone so like you said it may be hard to get this through airport security just this phone with all these wires coming off every button but but yeah so anyway so you can use this for anything where you have pretty much anything any electrical device will open it up you'll either have these jaggy things and so when you push the button it just grounds it it just connects the two bridges the two or it has something like this where it has its outer circle inner circle you just solder to them you put a transistor on them or something like that and you can run the device another thing that I made that I'm kind of working on still is this combination lock brute forster so basically what this is is a stepper motor that turns a dial and a servo that tries to pull the shaft out after it tries three numbers or whatever they'll have a laser point to a photo resistor that detects zero so I use that for a couple of reasons so one is when it's to make sure it's not getting off the other thing is a lot of locks have have known algorithms like the macho locks where you pull the shaft out you turn it until it stops and then you just write down all those and then you let it go back in then you pull it back out again turn it more until it stops you write down those numbers and you can reduce the number of possible combinations down from 16,000 or something like that to about a hundred and so this can do things like that because it goes until it stops because with a stepper it all knows is I'm trying to turn it but if you stop it from turning it doesn't know that it wasn't able to turn it doesn't have any feedback and so I just turn as far as I can then further than I think I'm gonna be able to turn it and then I just come back and see where it hits zero and I know how far it went and can use known algorithms oh I already said that so and it can also try every possible combination so here's a picture of it I actually realized that I forgot this when I got here so I started rebuilding it but I didn't get it done so sorry so here's a picture of it though so basically the servo on top and the metal plate is just a cover plate, electrical cover plate I picked up at Lowe's and it has those bolts so I can adjust the height of it make sure it's the right height for my lock and then this plastic stuff it's called shape lock that I use so you can see there's a servo at the bottom that tries to pull the shaft out there's the button that detects if it is pulled out so it's really, it's pretty easy to make really you can just pull a stepper out of an old printer if you have or just buy them online they're about 15 bucks you need it, probably need like a stepper driver to be able to drive it easily like an easy driver or something like that so one thing I want to say though about that plastic stuff is called shape lock and it's rad it's really cool so basically, see these little plastic beads you get water you heat it up in the microwave or something like that and then you you can make it into any shape you want until it cools down and it's really, it's really pliable and things like that as soon as it cools down it gets really hard you can drill it, you can cut it, you can do whatever you want it's really cool stuff if you have to make, you know, custom pieces and for this I need to have a, a piece that fit over the lock and fit inside the stepper or over the, over the stepper shaft and over the lock dial and so I didn't know where to get anything like that so I just made it with this stuff and it, it works really well yeah, you can so you just, you put it back in the microwave in the water or whatever and it just remelts, you can reuse it it's cool and so that's one thing though as well so you don't want to use it for something where it's going to get hot so like anything outside here in Vegas probably won't want to use it but so I think it melts at 150 degrees Fahrenheit and then, and then I, and then yeah so as long as you keep it below that for whatever you're doing, they should be good so another thing that I made using the shape lock stuff was a key impressioner so, so basically this works on, only on wafer locks this won't work on a pin tumbler lock just wafer tumbler so basically what it is, is this piece of this is actually shape lock as well so I took this piece of shape lock, flanned it way out made it about the same shape as the key and then I have, so there's several exposed wires at the very end of it, at the very tip of it and then there's wires connected to the body there's a wire connected to the body of the lock so I'll kind of show how this works a little bit so, so here's a pin tumbler lock that you guys are probably familiar with so it has all these pins, they're cut at different lengths but when it's, when there's no key in it they're all the way down because you have those springs on top you put a key in, if the key is the right shape then it's gonna raise them all up at the right level the cuts in the pins are gonna be at the right place and you're gonna be able to turn it a wafer lock works a little bit differently so a wafer lock has all these wafers and they're, if you look at the one on the left then they're all, without the key in it then they're all different levels, right? So this is actually the level that you need to be able to open it with a key because you want it to basically all go straight up at the same level they are so then it's not locking it and so then that's what the key does and so what that means is if I can get a device in there and if you're at what level they're at when they're down then I know what the key looks like and so basically that's the way this key impressioner works so I, like I said, stick this piece of plastic in it that the red is the wires at the very end towards the tip, that angle tip, they're all exposed and so then the blue things are the tumblers if you can tell so what I do is I put the key impressioner in as you pull it out at the right places you have to figure out where the right place are for that right lock then it will just hit that one wire that one exposed wire and so you'll know, okay this one goes down three fourths of the way or something like that so then you know what that key looks like as you pull it out and they're coming out with some professional versions of this, I think this year you're gonna see some coming out so, but it's kind of an interesting little project that I've just been measuring out with just the last week or two and so like I said then all you do is you connect power to the device to the outside of the lock so just the body of the lock and then you connect all these wires coming off the back of this to your Arduino and then you just see which one's given a high signal coming in a digital read because that's the one that's gonna actually be hitting because you have the body giving power and then yeah and so it's gonna go through the body of the lock through the outside, through the tumblers and into the device so another really cool thing that you can do is you can combine devices so you like it, we've talked a little about this before so you take an XB and you take an ethernet and you put those together you can take an RFID reader and you broadcast using cell phone or using XB or whatever you want so you can have this remote RFID reader that's reading stuff you can use Bluetooth for motor control using your Arduino or something like that so you have some robot you can control it using Bluetooth so it's just really cool the things you can make when you start combining things so some other interesting Arduino libraries that other people have come up with there's actually a cryptography library so you can do cryptography here it's really slow there's another project that where people are unlocking doors by knocking a certain signal on the door then the door unlocks there's another, there's a universe that's doing a project where you come up to somebody you do a special handshake and you're wearing a special glove next to an Arduino and it will make sure you do the right handshake to make sure that you're who you say you are you can also do, make an Arduino based oscilloscope it's kind of like a poor man's oscilloscope using the analog re-pins it's not super fast or super or the best thing ever, but it works and it gets you buying a lot of projects so like I said, Arduino is really cool and I love Arduinos but there's also some other alternatives that depending on what project you're doing you may want to look at the parallax propeller they're selling the kits here in the hardware hacking village it has eight cogs so it can do eight things at the same time which is pretty cool it can do video and audio and things like that so you can output to a TV AVR is just basically this is the chip that's on the Arduino you just take the bare chip and use it and like these are two or probably between two and four bucks a piece and so they're a lot cheaper than using an Arduino you also use a pick so they're pretty cheap to buy the thing with picks are for the most a lot of times you're going to have to buy like a proprietary development environment or something like that so you can code and see assembly ones are free and you can also do some limited size of C for free with a lot of them as well with a lot of the IDEs so there's also the free scale one that we have on our badges I really like this one as well they're really cool using processing experts you can do a lot of cool stuff with them so here's some resources that you might want to check out if you're looking for some additional stuff so the official Arduino website is arduino.cc it has really good forums the instructables.com has a lot of cool a lot of cool Arduino projects I have a couple up there Sparkfun is a cool place to buy things out of free Lady Aida she sells a lot of cool Arduino kits Maker Shed, Evil Mad Scientist Seed Studios out of China and they sell stuff that's really cheap and these guys pull allure they're actually here local in Vegas I need to so I can try to get that that uh the brute force for the combination locks working I needed a stepper driver and even though they mostly just ship out of here they let me come in and pick up a part and they're really cool and it's a Google Arduino so you'll find all sorts of websites with all sorts of cool projects on them so where can you go and learn more so I go to my local hacker space they do a ton of arduino stuff at mine and I know a lot of other ones do as well so just check out just Google and see if you have one near you if there isn't one consider starting one and you know just having you know start spreading the knowledge and things like that so also a lot of places like we have a local make group that does the same kind of stuff as the as our hacker space and then the other thing is upstairs there's a hardware hacking village if you guys haven't made it up there then you know I encourage you to go check it out one thing just a piece of advice don't go check it out in between talks because there's a lot of people just kind of wandering around super packed go check it out during a talk that you know if there's an hour you don't want to see a talk then just go and check it out and there's a lot of people doing cool stuff people are really happy to help you out and let you borrow tools and just talk to you about stuff I was talking to a guy yesterday about or a couple days ago about stuff he was doing with arduinos and he's been making things for like radio stations and on all sorts of really cool stuff so then this is I'm going to put all my code and slides and things like that up on on this github site so github.com sketch where the E is a three and then you can follow me at Dave W. King on Twitter if you are into that so I think that's all I have so see if anybody have any questions or now I'll let you guys go yeah go ahead Ben that's a good question so basically I was going to cover that I forgot so I just found a so I knew that it had to be 160 microhenrys and so basically what I did then is I found a calculator online where you just put in okay how big is your is your wrap thing and so I measured the toy paper too and it was two something inches then I just said how big is your wire so I just looked at the gauge of the wire this wire I just picked up from Radio Shack comes in like a thing of three different color wires use the green I don't know and then so I just used that calculator I put in and told me how many wraps I need to do so I wrapped that many I tried it out and it wasn't quite working so I wrapped a couple more tried it out it wasn't working it took me about half an hour I think I'm just messing with a couple more wraps trying it out then it just worked so so there's an instructable on this project and on that instructable I tell you how many wraps I did I can't remember off my head how many it was but my wife's laughing at that project apparently but no she watched the whole thing any other questions? okay let you guys out a little bit really if anybody wants to come and see any of the stuff or ask any other questions after this you're welcome to come to Room 106 you come see it up close and so I'll be be in there thanks