So there, yeah, a few things that I had planned to have devices for all of us, the programming devices, it didn't work out. The source code is not online yet either, so we have a few inadequacies to work around, but we are hackers, so we're excellent at producing workarounds when we need them. I think success is defined by we have a badge, we want to program it, and we understand the workflow, right? We kind of understand what we have to do maybe in the office at home if we want to change the behavior of our badge and a number of other similar devices because it's a similar workflow. Now, there's going to be, I'm going to show a few tools, and we don't have a full day. We have an hour, an hour and a half, so the tool set I'll show is a very small subset of what's possible. This is always the case where there's a lot of different tools. This is just the way I'm doing it, and please feel free to ask if you think there's a better way or a way you prefer. I might know about that. I can help you out. Before we get started, it might help to distribute badges to the people. If you haven't purchased a badge and you would like to in order to program it now, if there's a small group that wants to do that, I think we can handle that quickly. Is there anybody who? Still wants to purchase a badge? Okay, so there's one or two people. That's fine. In the meantime, because this will take a few minutes, you may want to download. Well, first of all, if you haven't got an Internet connection set up, you'll need to download some things. You can quietly, passively observe as well if you prefer, or if you don't have your computer with you, and you just have a phone, it's fine. You have fun with that as well. But there will be a hands-on component to this workshop, and it's over an hour long, so we have enough time to do that. What we will be downloading, this is my preference at least. It's called Platform.io. I don't know if I can make this bigger. I'll try. Yeah, that seems to work. Well, the title bar doesn't. It'll get bigger. But the URL is simply platform.io.org. So you want to maybe read through there a bit, and you want to learn how to download and install it. What it really involves is downloading Atom, but it's all on the page there for installation. And while you do that, I think we'll just take care of the one badge that we still have. You need to get set up, and I'll turn the microphone off. Yeah, there's going to be two things that if each of us want to individually program on our own computers, we'll need two things, two new things that you may not have yet. That's this Platform.io, and there's a command line utility. It's called AVRdude. So this is... This is how I installed AVRdude. I know I'm getting too far ahead, but for anybody who's quite advanced, I don't want to get you bored. And so... Well, first of all, let's do a search. If you're on a DPKG-style distribution, then you use APT or something. Obviously, the RPM ones are Yum, Zyper, and so on. AbdCache. So we can search. For AVRdude. Yeah. So it's kind of running off the end, but I think it's clear enough. This is the other... So this is not Platform.io. This is the second piece of software that I'm talking about, which is part of our suite or our workflow. So we will need Platform.io, and we will need AVRdude. And both of these two pieces have alternatives. But with a limited amount of time, it's going to be kind of a demonstration using the tools that I've been using before. So having said that, short explanation of what programming means and how a badge starts out. So imagine... In fact, you can see that three of these badges, there's four, three of them are lit up. That's because there's a microcontroller controlling the LEDs. And doing things with them, turning them off and turning them on in succession to create this animation, right? That's a program that's running on the MCU, just like a program could run on a MPU, a microprocessor unit. This is a microcontroller unit. And one of the big differences is that the storage of a microcontroller unit is directly inside, embedded inside the... The plastic housing of the chip. So this is what some people refer to as on-chip debugging or on-chip programming. It's a very different procedure as what we have with MPUs. A question? Yeah, on the platform. Right. So Atom is what you'll probably choose. Atom is a generic web editor, which I think, what is it, Jithub uses? Is that right? Jithub kind of develops Atom for general use to... Yeah, it's an editor. And the beauty of Atom is that you can load plugins, components on top of that to make it a full-fledged IDE, for example, which platform IDE is. That's what they're using for it. Now, I assume that if it gives you a second option... VS Code or whatever, that you can try that as well. It sounds like a more Microsoft-style type of thing. If you want to experiment with that, if you have a Microsoft distribution running on your computer, maybe it's a better choice. I'll try to help, but I don't have any experience with Microsoft. In any case, so back to what these microcontrollers are doing with the lights. So they're controlling the lights in a very simple way. Turning on, turning off. That's what a microcontroller does. When I receive them from the factory, I receive them on a reel like this, and there are 1,000 or 1,500 microcontrollers on there, on these little chips, right? And then I place them on these boards, solder them so that they are, yeah, soldered onto the board. And as soon as I flip the switch and turn it on with a battery or an energy source, basically nothing happens. Because the factory does not know. So if I'm controlling lights or if I'm detecting a door that opens or if I'm measuring voltage or measuring temperature, they just have no idea what my application is. So they arrive in an empty state. That's kind of what would happen if I turned it on. This one here is not lit up. It simply wouldn't light up because there's no program inside. And that's what this workshop is about, to find a way to get our own programs inside the MCU so that when you turn them on, it does what you want. Question? Another question. How do you start designing these batteries? Is there quite a set of sites that I can go to and just guess what gets on the ID or on the image or whatever? It's kind of a total question. Yeah, it's not relevant, but I like the question. So the question is, how do I, I think it's kind of personal, how do I start to design a new badge? This, okay, well, I'll give you a very practical answer. I'm designing badges for a quite well-known cryptocurrency conference in Europe, which will take place in October. I don't know if they want me to announce this because their badges will control entrance, and it's quite expensive. So they probably don't want people to know how to knock off the badges. And so this is a full set of requirements that they're giving me. They're asking me questions about are they able to change the shape? Can there be circles? Can there be route-outs? Can there be squares? And these are all questions I have to answer. I won't get too far into it, but, for example, the route-outs need to have round edges. Because what they're doing is sinking a drill bit into the PCB and then going around and removing surface area. So there's always going to be a round area. These are the kind of things you talk to customers or groups or coworkers, colleagues, project. People. And that's kind of how I get started. And then usually there's a lot of chaos involved. And then how cheap can I get the LEDs? Oh, they're only green, but I don't like that. But then, you know, trade-offs, okay, cheapness, wrong color, whatever. You know, I don't have any better answer than that. Yeah, so we'll see. There's going to be plenty of other badges involved. So. Right. That's what happens when I get these MCUs on a big reel from the factory. They're empty. I put them on the board, solder them, and then I need to program them. That's what everybody needs to do. And not everybody is producing hardware. But this is relevant for anybody here if you want to change the behavior of the MCU. Because they're not locked down or anything. You can just erase them so that they're factory state again or overwrite them with your own. This is not called software. Software would be if you connected a USB cable to this, and there was USB communication to your computer, and then you opened up a web browser or something, and then had some type of software, host software running. A lot of people believe they're running software on the badge or the wallet or something else when it's really only running on the notebook, and that's software. What's running inside the MCU, this little chip in the corner, that's firmware. It's important to know that distinction, right? Okay. So I don't see too many computers, but that's fine. We'll get started with a quick demonstration, and then I think whoever is following along and trying to do hands-on, we'll slow it down then, and I'll pay some individual attention to try to get things working. Does that sound okay? There is kind of one. Or two. I think there's two computers in the room. All right. That's fine. Okay. So the first thing is a demonstration. I'm going to show how to change the behavior of, let's say, I don't know, I'll take this corner one down here. So I will change that. What we have so far, okay, so let me just, let me create a new file. I have already downloaded node platform IO and installed it. So when I, can we see this? Right. So when I type Atom, you can't see that on that screen. Okay. Okay. If. Okay, so if I did this, then I would be presented with Atom's screen. And this is kind of the first thing I always see, an error message. That's how it looks when you've installed platform IO. Now, I'm a bit concerned. I think I have two. I have two copies of Atom running. I'll try to get rid of one of them so I'm not using memory unnecessary. Yeah, there's two there. All right. So now we have one only. I think you have Atom as well. Have you found a way to install platform IO on your Atom? No, I don't have Atom IO down, so I'm going to start asking the question. Okay. But it's working all, yeah. No questions about it? Yeah? So far, I have no idea, so I don't know. So I'm going to start asking the question. Okay. It's a package that you need to search for, I believe. I believe it's, let's see. There is something up here, packages. This is Atom and how to. Yeah, I'm not sure how. Hmm. I myself have forgotten how this works to install more packages. Maybe help. Atom. Welcome guide. I think that's it, yeah. Yeah, so once you do see the first screen, you can install a package here. Open installer. Search packages. Platform IO. And. Introduce oil. A package from iOS. APIX? � They're. The first step is this platform I. Oh ID. E. And all this does is allow us to edit in your program. And. Compile. it to the correct architecture, which is not Intel or AMD or ARM. In this case, we're doing Atmel AVR 8-bit. So that's the first thing that we're trying to do. That's what we're using Platform.io for. And so once you have the Atom editor installed, what I just did helps you find the Platform.io packages, and that's how you can install it. Mine just says uninstall because I already have it. I think there are two here to install, but that's all in the information of that Platform.io website where it explains how to install it. Did you get so far? Have you had any problems? No. Well, yeah, tomorrow I'll be done installing it with the . Tomorrow, yeah. . Tomorrow, yeah. . It's the other way around. Atom is the basis. . Exactly. . What's the question? . What? I don't think so. . No, no, no. You don't have to register anything. I know that Platform.io is very, very good for the web hosting sites, but platform.io, they optionally, I think there is some method to register but I've never done it. So I don't think it's needed. Did you try the searching for packages inside the Atom editor the way that I did this? That may be the distinction. There may be many ways to use platform.io, and I know that it's a very small group. I know the guy doing that is getting confused. He's a good one. So we're going to have to track him first. No, he's in Europe. He was invited to the village, but he couldn't make it. All right. Thank you. Okay, we're back there. I'm just trying to find this link. This is interesting. There we go. Okay. New base. All right. Okay. Okay. Oh, here. That's my screen there. Okay. Hello, world. All right. Okay. So I already have my platform I.O. set up. I'm just going to do this as a demonstration while they're still getting set up so that everyone knows a bit about how this is supposed to work. I searched from the help menu. The help menu has about... No, has a welcome guide. And in the welcome guide, there is on the right, at least for me, there is install a package. And under, I think... Yeah, under that, there's open installer. And where can you... Yeah, and at the top of that, you can search for platforms. Just be careful to type return after your text because otherwise it doesn't... doesn't search automatically right so I'll remove the settings and the welcome I don't need the welcome guide okay so platform I owe what I'm now interested in is making sure I can compile for the Atmel AVR 8-bit ISA the instruction set which is for which is what we're using with these MC use because these MC use are not arm based they're not made by Texas Instruments they're not Intel etc they are from Atmel and they use AVR 8-bit instruction sets so I'm going to look for platforms I think is the correct answer area here and for whatever reason the first one that comes up is at Mel AVR because it starts with A I believe is maybe alphabetical and just to show you if you're curious what else is available there are expressive there's I think these are all the ones I have installed so there's not many but sorry it's okay yeah I think there's two that you need. It's platform.io-ide and platform.io. Let me just show you the ones that I have. So I have platform.io-ide and it's possible that by simply installing platform.io-ide, it will... It will install the dependencies as well. If that doesn't happen and you suspect that something is not behaving correctly, then you will see that I also have platform.io-ide-terminal. Yeah. I'm not sure if it's needed or not. You can test and try on your own. I just have those two. Right. So what I was doing just a minute ago, is, okay, I'll give you a short one-minute tour. If I click on boards here, it's probably going to show things like Arduino, like BoosterPack, like, well, let's see. It's got Bitsy. There's quite a lot here. Adafruit, Bluetooth, whatever, Bluefruit, Micro. There's 96 boards. And there's just quite a lot of things. Let me... 15 to a page. We can do a... 1,000, though. Let's do 100 to a page. And alphabetical again. So there's lots of Adafruit. Arduino must be the next one, exactly. So there's Arduino Due, blah, blah, blah. There's lots of boards. You get the idea of what a board is defined as in the platform.io world. And at the bottom, there's a BBC Micro bit, for example. I think some of you know what that is. As far as libraries go, if I click on that in platform.io, it's going to give me options to load libraries to control serial buses like I2C or maybe temperature modules which work on digital basis or analog. These are all the libraries. So we have sensor libraries, control libraries, et cetera. Let me just see the ones I have installed to give you an idea. What, I have none? That's impossible. What's built in? So, Esplora, Ethernet, GSM. These are the type of libraries. So we've taken a look at boards, libraries, devices at the very bottom. Oh, devices is simply what platform.io has detected. It's connected. It's connected to your computer. So if you have a USB connection, serial, or I don't know what the other options are, I guess over Ethernet, those are the devices that it tells you you have connected. Possibly if I connect my programmer, it will detect that. Let's just see if that's the case. Refresh. I kind of doubt it will work, but it is connected over USB, so maybe. It didn't work. Okay. Well, all right. I'm not going to spend time with that anyway. The very last of all of these areas, which make any sense, I mean, we've seen the home already. And the account, I don't have an account. It's not needed. The very last that I've shown is now the platforms. And as I mentioned, there's a few here, Tiny, Teensy, Espressif. These are the ones that I have installed. There are quite a lot of others. And Admiral AVR is the one that we need to use. We need to use to program these badges, because that's the architecture and instruction set. So I hope that's clear enough. So this is kind of very complex IDE that gives you a lot of features and functionality. It's definitely more than the Arduino IDE, although you could use it as well. We don't have enough time to do every IDE in the world and Visual Studio and whatever else. You can probably find a plug-in for that as well. Okay. But we're going to stick to PlatformIO. I like it. And so here, there will usually be maybe some, let's see what it gives us. Sometimes we get examples and things, AVR 8 and 32-bit MCUs here, examples, for example. And under boards, it tells you what boards are using the AVR 8-bit and 32-bit. Instruction set, what I like to do is go right to examples. You see that here? It's kind of hard to see at an angle for all of you, but if you take a look at examples, you have a few different ones, like Arduino Blink is this one. You can choose that, but you can choose a lot of others as well. Arduino Blink is good enough for us. And you can kind of see the style of the things you need to do. This is not so interesting. The INI file, let's see all the files we have. This one is maybe good. So this is kind of, oh, this is all there is. So that makes it a great first case example. That's all you need to program and type. And just like all Atmel or at least Arduino framework programs, you have a setup block and then a loop block. The setup just does things one time, and the loop will obviously loop. This is kind of the way microcontrollers are made to work. And if you look at the source code there, it's kind of small, but I think you can see it well enough. It's very simple. It does a delay so that your blinks are separated by a delay of some amount. And the digital write is simply setting a voltage on a GPIO pin, which in this case is the LED bill. It's a built-in pin somewhere in a header file that's defined, I think, as pin number 13 or something. And you set it as high. And okay. So that's really very clear and easy. And that's similar to what we're doing here on a very basic level. There is a couple problems. If you, this is not so intuitive, but if you take a close look at the badge, you count the number of contacts on the MCU. There are eight. Now two of those are immediately used for the ground plane and the voltage pin. So you have six left. Because there is a button connected to that, a tactile switch, that will take up one more and you have five possible inputs and outputs, GPIO, general purpose, input, in or out. So with five contacts, you're trying to drive 16 outputs. Seven LEDs. And if you look at the structure of a program, you'll a voltage to one pin and it turns it on to the high parameter or it turns it off through the low. So you could do that to five different LEDs, and all the other 11 LEDs, you wouldn't be able to touch them. There would be no direct connector, connection to the five contacts on the MCU. So it's been a long time since this problem has been solved. Anduum, there, that's great. Basically, it's a multiplexing problem where you want to have more than one input or output for one contact on the MCU, and it's called Charlie-plexing. I can't remember why. Maybe the person who solved the problem for the first time is named Charlie. I don't know. Does anybody know? Anyway, so that's what we're doing here. We're doing Charlie-plexing, so we're connecting a multiple of LEDs with a resistor in between, and it's a bit complicated and not worth mentioning in detail, but this is what we're doing. We're just doing it in a more complex manner so that we can control more LEDs with the small amount of contacts we have from the MCU. So what should we do? We could compile this, and if we're really lucky, this LED, which is defined as LED, built in, would map to one of the LEDs, which I have chosen. I'm actually quite curious because I haven't tried this. I mean, it's a 50-50. It's a less than 50-50 chance, but let's try it. So to compile this, how do we do that? Somewhere there must be. I've kind of forgotten from the examples how to. To compile. How do we do that? So I'm just going to cut and paste, I think. Whoops. That's too much text. Let's just imagine that for the first time we're getting exposed to a new platform. We don't know how it works. So I'm just going to create a new project. I've totally forgotten how. Okay, let's go back home. New project here from the home screen project name. Okay. Defcon test board, and we will do, what is the correct board name here? I'm going to cheat here because there is. The board is called AT Tiny. We're still in demonstration mode, so this may go a bit too fast. AT Tiny, and it's 13A. There it is. And framework that we want is Arduino. Location, use the default location. Finish. So this is now creating a new project called Defcon test. And I have on the left here now, Defcon test, and libraries, everything is set up the way I need to. So it did a bunch of work for me. I even have a main.cpp area with a loop and a setup. So I'm just going to erase this because I have copied the example from before. See that? So this is what I copied before. And it's the blink example for the Arduino. Arduino, because it is a VR 8-bit, it can possibly work. I'm just concerned about this here. This might not work. But because I'm an adventurous person, I'm just going to try and compile it. Up here, there is a build. Save and build. Failed. I'm sorry. So this file is going to move to util delay h. It's going to move to util delay h. No. All right. So that was a good try, but I'm going to quit while we're still on time. Instead of doing that, I'm going to take source code from what I know is good. Let's get rid of this here. Okay. How do I get rid of this? There's an i.o. build on the left, very left bottom. Maybe that's just your build profile. You mean that there? Yeah. Build target. All right. Target, target. What do you mean build target? Good question. What do you want me to do there? I'm going to go to the next slide. Now, yeah, I think trying to use an example from a different board is, this was kind of an exotic test that I wanted to try. So I'm going to erase the text that I just copied there. And we're still in demonstration mode, so I'm going to copy this file, which I know is good. It's not the one that's running on the badges exactly, because that's not uploaded yet, but I'm quite sure that it will work. And we'll need one more file. This looks okay, right? And we need one more file. This one. Yeah, this is C. So I will create a new file in this project and put that inside there. And it's untitled. We'll call it, we'll call it main.h. I hope that's the right place. Oh, yeah, yeah, yeah, yeah, no. Should put it in temp. All right. It's not in the right place, so let me just put it there now. Projects, flat IO, yeah, that's it. And over here, flat, so, and then we'll move it to where it should be, namely, DEF CON, where did it go? So, now I need to find the place where this new project is stored. Platform, documents, platform, IO, projects. All right, sorry about this. Documents. Documents. Main, platform, IO, and projects, DEF CON test, projects. So, that must be correct now, but it's still not. No. Okay, so that looks okay. Our main.h is in the correct place. Main.cpp is... Looks okay as well. Oh, I haven't saved it. So, I'll just save all the files now. Save all. And I have the home here. I have the cpp here. And there is a main.h as well. Let's cross our fingers. I saw a lot of red there. I'm not sure why. Oh, no configuration. Ah, okay. That's why. So, platform, IO, ATtiny. And it's saying no configuration. Now it works. Okay. Okay, success. So, what I just did was... I cut and pasted a bunch of source code, which I know works for this architecture, and the pin assignments are similar to what I used for the LEDs soldered onto the board. So, this is not exactly what's running on these boards because that source code I'm too disorganized right now, and I haven't uploaded it yet. But this does work, and I have copied it into this file, and there's a main.h file as well, a header, which is... It's not very long. And so, I just built it. I can build again to show you. It goes pretty fast. So, build, and then down here, it basically says what it's doing, and it succeeded. What it did, really, is used a gcc.avr version of the compiling environment. This is not Intel, but it did a lot of tricks because it understands what architecture it's building for. And I should be able to find the binary now. If I just go back one, and let me put this at the top. I think it's called... Yeah, it's in here, and ATtiny13, and there it is. There's the firmware. Let's show both of them. The hex is the one that we're going to copy over this one. Here it is. So, now... Let's see. AVR dude command. I've kind of forgotten how it is, but I can find it quickly. All right, here it is. So, the next thing we need to do here is... What does AVR dude do again? AVR dude takes a binary. It does other things as well, but it takes a binary like the one we just produced, and it programs a chip like this one over a USB connection. So, we don't have USB logic in this hardware. We'll need some kind of middleman that understands the USB commands and everything coming from AVR dude. And then, transfers it in a protocol that can handle, which is SPI, the Serial Peripheral Interface. So, that's what I'll demonstrate now. Firmware.hex, I think that's the name of the file. We're going to flash that and write. This is a command. I'm going to change the fuses. I think we need to ignore... The fuses is basically... Every microcontroller has usually an internal clock. You can tell it to... To reduce the clock speed. You can sometimes change a fuse so that it's no longer programmable. There's internal fuses. These are the type of things that AVR dude can manipulate. And here, I'm telling it to release the halving of the internal oscillator. When you get these chips from the factory, they're made to run very slow. And if we did that, then all of these chips would run very slow. And this animation would just be very slow. It wouldn't be nice. So, I always release this fuse, the 3A fuse, right? And this is the programmer that I have, which is the C command. And if I do nothing at all, because it's not connected to anything, it will give me some errors, right? Command failed because it's not connected to anything. But if I do it again after I connect it, I can connect the programmer, which looks like this. I'll try to raise this up a bit. I mean, it's going to be hard to see. I apologize. But you can understand that my computer is this. And then I've got a couple of cables for power and so on. And this white thing here is an Atmel. It's called an ICE. I'm not sure what that stands for. It's a serial programmer. So, this is necessary because there's no way to connect a USB cable directly to this board. If you have a board like a Raspberry Pi or something where you can directly connect a USB cable to it, then you can program directly. This is kind of a bad example because a Raspberry Pi has no microcontroller. But because we don't have that, we need a serial programmer like this. Okay? So, now I'm going to connect that to this orange board at the bottom. When I turn this on for the first time, that's the animation that begins. It's a fast animation. When I click, it goes to a slow animation. And the third option is kind of a strange Cylon thing there. Okay? So, I think that... So, I'm going to connect and program the new thing on there. If I can just... There we go. So, this should work now. Oops. That happens sometimes. Oh. I didn't have it on. Okay. I think we're still okay. So, these are the files. And now I'm going to turn it on. Okay. Now that's working. You can see it's writing at the bottom. And if you look at the badge, it's lighting up a lot of the LEDs. So, now it's no longer beginning with the fast animation. So, now it's no longer beginning with the fast animation. It's a bad example. I should have done something more pronounced. It's starting with a slow animation. The next one is a fast animation. The third one... Yeah. I did almost the same thing. Okay. To make this more pronounced, I'm going to change the source code. And that will be the end of the demonstration. And I'll walk around and try to get people started on doing other things. We can change things, I think, close to the bottom here. We can change things, I think, close to the bottom here. So, here's the loop. We'll start with... We'll start with a... We'll start with five. We'll just do five, zero, one, two... We'll just do five, zero, one, two... We'll just do five, zero, one, two... Three. And that means that our maximum... I think it's at the top. Three is the max. Was it... Yes, three. So, this should be correct. So, I'll go back. Build. Success. And... Connect. Connect. Connect. I can't see. Okay, connect and program. Take a look at the badge if you can see it. While I'm programming, it's going to light up. It's interrupting all of the... Exactly. Okay. So, now, I turn it off, turn it on, and you can see that it has a new program on there. The very first animation is different. If I switch to the next animation, it's a different one, switch to the third, and there is no fourth, I believe, or maybe, okay, the fourth is the default end of animation, animation, and the first one comes back on. So I think that kind of demonstrated how this workflow works, right? There are lots of options. Instead of Platform.io, you can use Arduino, you can use AVRGCC and make files. There are different things to achieve the same results. I think we still have a half hour or so. So at this point, I'll take some questions and then walk around and try to help those with computers do what they're trying to do. Any questions? Do you need to get that serial programmer? What do you need to get? Right. Well, the one that I have, which I can tell works pretty well for Atmel architectures, is called the Atmel ICE. They have different versions of that, I think. A few years ago, they started with one. I'm not sure which one I have. Maybe it says a number. I don't know. It just says Atmel-ICE on there, and then there's a serial number and a date. So that'll work just fine. They're a bit expensive, though. I think they're $80, $90, something like that, and they're not worth it. Why do I say that? Because an Arduino will work just fine, almost anything. There's all sorts of things. There's all kinds of hacky projects. If you look at Hackster.io or a lot of online sites, you can download your own PCB from Oshpark, populate it, and create a programmer on your own. Obviously, the easiest answer for you, if you're trying to get started easily and quickly, is to do the same exact thing that I did and then copy that model number down and just pay the money and get it, and it will work just fine. The other thing that I might say is that there are two interfaces. That's where you can plug things in onto these badges, because I know some people, well, people have different preferences, right? They both have six contacts, so they're very easy to identify. In fact, going to the badge website, which you maybe didn't know there was a website, it's this here. This is what I'm talking about. These little interfaces there with six contacts, one of them, there are six holes, and in the other one here, there's six contacts as well, but they're not holes through the board. Either one of those work to program the boards. The one that the hand is pointing at now, it's called a tag connect interface. And the other one above, this is the traditional, actually. It's just 2.54 millimeter pitch header pins. It's not really a name, but it's a traditional Arduino programming interface. So some programmers come with cables for one or another, or even there are many other types. Question? So each of those, what connects any of the three? And that's in our board? So there's only one MCU, and the other two chips are non-programmable. They simply are storage, like a USB media stores things. Right, so you don't have to worry about those as far as programming goes, and that's why there are no interface plugs or connectors there. The connector really is just a wireless connector on the back of the antenna. That's how you access those, and that's the interface. The interface for the lights portion, that's what we're talking about now. And depending on what you like best, what I like best is this tag connect interface because of the way that I can very quickly program. I push down, it has the tag connect cables have kind of a spring action pogo pin assembly on there. So I can very quickly go from one to the next board. And there's no attaching a cable, but I must say that most people are more comfortable with the header pins and the traditional Arduino plugs. And it works just as well, and they're more available, they're cheaper. So that's why I put both of those on there. And if I wanted to go crazy, I could probably do three or four other alternatives. All I would do is put traces on there. It would be really easy, but it would be more confusing as well. And I would be populating more parts anyway. It's not important. So you have two choices on where to plug in. When I just plugged in myself, it's too small to show you, but I connected to this here. To this, I can't get it, there it is, to that. And that is when you saw all of this writing. And verifying happened. AVRDUDE is what programmed the badge. Any other questions? Yeah, well, there are two people. There's AGS and there's me. We're selling the badges. AGS has packages of badges for anyone who bought over his website. It was a pre-sale that happened a couple weeks ago, I guess. And a lot of people bought it. People bought badges, and he has their order numbers. So you need your order number if you did that. If you didn't buy it during that time, then I have badges as well for sale. In fact, I have all three now. The problem yesterday, I wasn't sure how many I had of all three, and I had orders to fill. So I was telling people we were sold out. It wasn't. I thought we were, and I was being honest. But we're not sold out. I think I have a couple handful left of the high-value premium badges. And I have a couple boxes of the regular ones. Any other questions? Was that halfway clear, the workflow, where we started with Platform.io? We typed. We edited. We developed and coded. We built and compiled. And then we had a firmware file, which ends with .hex. And then we used AVRDUDE to program that over a USB device onto the board. My question is, what does it do without any mods? What does it do without any modifications? I can't show it anymore, because I overwrote mine. But all of the badges that I sell, that I've produced, are the same as... What's that? Let me rephrase that. There are three different models, right? There is the regular. There is the alien. There is the nice blue color. And then there is the boss badge, with the two-tone colors and kind of the authoritative animation. Whichever you choose, your animation will match every other person that has chosen that badge. I don't know if that... I mean, that doesn't really answer your question. I'm just... . Right. So after you switch it on, the first animation appears just like everyone else. And you can change that by clicking on the switch. You need to hold it down, because it only samples at the end of the animation. So sometimes you click too quickly, and it won't register it. But if you click at just the right time, or if you hold it down long enough, then it will register. And then it goes to the next animation, which I... Which is part of the source code. Whoops. Where is it? Which I just modified in order to change the sequence. Right? And that's all that you can do with one button. You see, it's quite a limited device. Right? This is not measuring temperature, or you don't have a screen to get menus and things like that. Does that answer your question? . Yes. Okay. So the question is, does it have NFC features? And the answer is yes. It's difficult to answer, because, okay, first of all, I call this a split-brained badge, because there are really two sides to it. And that's why I wrote lights on one side and radio on the other. And there is no communication between the two sides. What would be very nice, and what would work for the... I think the battery's running out. Does anybody have batteries for the microphone? What we'll be working on for the next version of badges for the next conference in Europe is that once we place the badge onto a NFC device, the microcontroller understands that and lights things up. It's going to be a bit different. It's going to be good. But that will require that there's communication from the NFC radio side to the MCU-powered lights side. And our situation here at DEF CON, this is a split-brain. There is no communication between the two sides. So if you lay this onto an NFC reader-writer, an active NFC device which can supply power like a phone, then your radio logic, your radio circuits will work, but the MCU won't have any idea about it. You can even have the badge turned off. You can take the battery out, and the radio circuit still works. The way to use that... So there are two buttons over there as well. Try to imagine an NFC tag, a library card, or whatever has an NFC antenna loop inside. I'm not feeling too creative after so much lack of sleep, but if you can imagine an NFC application, maybe in your school or whatever, door access control sometimes. Sometimes it's a RFID device, but it's very similar in any case. There's a connected antenna, and there's no energy source for one of the two sides, for the passive side. Anyway, so this is the same thing with one exception. Instead of simply lying it on the reader and the reader automatically recognizing, picking up, and taking the information, which could lead to opportunistic damage, data theft, for example. If you, for example, embed an antenna on a table, that would be great at DEF CON, right? You're stealing people's data left and right, their wallet's going on the table, and you're reading their library card information, whatever. What we decided is to block or defend against that by putting switches on here. So if you lay your badges on a table that was manipulated by an attacker, they will not be able to get your data. It doesn't mean you should store... critical data on here. I recommend against that, but it does mean that you have a bit of protection, because you must use your finger and push on one of those two tactile switches, and at that moment, a reader or a writer can access the NFC circuit. Only then you take your finger off, and you're safe again, or marginally safe, safer than usual, right? Does that make sense? So if you have your library card, and you go to a coffee shop, and they have sometimes embedded chargers on the table, and you might have your telephone there, and your library card here, they can take your data easy enough. I mean, if you own the coffee shop, and you embed an antenna on there, there's going to be one customer who puts their wallet on the table, and then you have their data. But if that customer had a blocking factor, something like a tactical switch, tactile switch like these here, then they would need to first push on that to complete the circuit with the antenna, and only at that moment can data be read out of this, or written to it. And I can talk a bit about how to use an NFC tag in general, but this is kind of a... There's probably... If you search online, you know, NFC tag, this is... It's very basic. I don't have examples, but a lot of... A lot of what? Library cards, for example, have RFID or NFC embedded inside the plastic. You don't really see it unless... Sometimes you can with a very bright light. That's a radio circuit and an extremely small chip inside as well, which basically stores a very small amount of data. So it's... It's... It stores a number for you, an anonymized number, so your library customer 568540 or whatever, you lay down your library card on the reader, and then you can check out books that way. And if you don't return your books, then they match your number to your name and address and send you a bill, right? So that's one of about 50 million applications for contactless... radio applications. Contactless just means you're not plugging cables in and creating copper or physical connections. It's going over up to 1.5 millimeters of distance of space. It's a wireless interface. So that's what you have in these badges as well. All three of the badges which I sell have this feature. The only difference is that the less expensive... I like... I like to keep prices as low as you... You can see what prices are. I like this because it kind of democratizes badges. It's hard to find cheap badges at DEF CON. I like that, you know, anybody, regardless of how much money they have, can have a badge. But that means that I have to put less high-rated components on here. So the tactile switches are a bit clumsier. They're not as nice. They're not low profile. They click a lot. And the NFC EPROMs don't store very much information. They can just store two cases. 64 kilobits of data. And the others can store 64 kilobits. So, yeah, people are always asking what the differences are. Those are a few of the differences. Any other questions? You're welcome. Oh, this screen is off. I was kind of... I was kind of hoping to get a bit further with hands-on, well, which isn't so relevant if we just have one or two people with computers in the whole room. But I think in other parts of the world, maybe again at DEF CON next year, we'll have similar situations where instead we'll be better prepared and we'll have one programming device for each of us at each table position, for example. That was my plan. I just didn't get to it. But I did do the demonstration, and I think that kind of clarified a bit of what must happen after one of these chips comes from a manufacturer, STMicroelectronics, or no, in this case, I'm sorry, this is Atmel itself, comes to the producer, that's me, and then they solder that on, and it's empty. What has to happen then in order for anything like lights to appear, right? You need to develop, compile, and then program. That's kind of the workflow, just in a nutshell. Yeah, so there is... There's still, you know, 10 minutes, but I think most questions have been answered, and we don't really have much time left. So I think we'll end it early, if it's okay with you. One last question. Yeah, that's fine. Should I come over to you? I'll wrap up here, and then... Or is it a question that I can answer like this? Yeah. Okay, that's what we'll do next.