
are going to start we're just after so we'll get this going uh some quick introductions I'm Waylon Grange um there's my Twitter do we do Twitter handles anymore anyways I did the hardware stuff and I am Paul Whiting I did the software part we don't really want to spend time talk about us so this was one of the last renders of the board I did out of Kai CAD before we send it off to the shop this is what we assumed it would look like I actually never did a prototype that was this final board um Computing was joking with me just before this about he says he did a talk at a hackers con convention where he
said in the name of this talk was there's no rev2 right like you don't have time when you're doing badges like this to do a second run and so really I never saw the finished badge Pro board until the final run the the pre I did have a prototype prior to this but that prototype did not have a joystick and it was kind of laid out a little different so I didn't know for sure if everything would work and everything didn't work but we'll get to that point okay so a few points about the badge one it's meant to be broken it's meant to look like this not necessarily you don't have to you can keep it all together but
each of these little Parts is an individual component that you can use in your own adreno or Raspberry Pi Projects okay this little tiny one is an accelerometer and it speaks i2c that's what all of these cables are is a quick connect for i2c so if you have an Arduino at home and you want to hook it to an accelerometer you now have an accelerometer or you want a joystick for your Arduino projects that you're working on at home or you just want some Blinky LEDs all of these things are ITC and they're meant to be worked with they're meant to be played with with other projects or spark fun I don't mean to sell any particular vendor but
SparkFun has a lot of Quick Connect devices that you can add to this badge you can just daisy chain them and throw them in here they have like a keypad they have like a speaker some eprom they have some other fun things RFID reader 14 segment displays oh yes yes some some all LEDs a segment displays you can buy them and then incorporate them in the badges and Paul will talk about how you can kind of do that there's also pins for an Sao header in front of this led so if you you go to Defcon and you get all those S8 headers you can throw one on right there or Sao pins see how many badges excuse me you can
throw it on the front of there as well so it's really just meant it's to be a hackers badge it's meant to be a toyed with it's a little different than our traditional badges we've done here at this conference in the past um the oh yeah here's an example of some of those SparkFun devices thrown in line just you can just keep daisy chaining more and more pieces into the badge so this the main processor on this chip is a Raspberry Pi Pico this image here the one on the right I have to look at my hand the set the one on the right is the one broken off of my badge so you break it apart and the one on the left
is a Raspberry Pi Pico Dev board that you can buy from a shop they're almost identical I mean they're the same chip the the one that the badge has has slightly more memory uh flash base and slightly fewer i o pins exposed but it also has that quick connect port on it where the the one from the store doesn't but yeah if you were just gonna buy these from the store this is what you would Dev on that's we try to make this as similar to that like you can Dev on this board and do whatever you want it's a very powerful board it's 103 up to 133 megahertz 264 KB of RAM um I was telling some I was telling some
of the young guys this and they're like can it run Unity no no I can't run Unity but this is more processing power than my first PC okay so like this is pretty good for a microcontroller um but uh yeah from my controller this is a lot a lot of interfaces a lot of things you can do with and it's really easy so it's a really fun intro device if you want to start playing with embedded um the badge itself the all the little components on there they are tiny tinier than I typically like to do on a badge this is how tiny they are when you're hand soldering them on all the prototypes we hand soldered them
um so you it and the picture on the right was an early prototype for this year's badge that we totally scrapped so it doesn't look like these but it used the same we had a lot of the same Hardware but like the design theme we totally scrapped I think going with Rick and Morty was probably the right idea but um so the process of building the prototypes this is the stuff I think is kind of cool right you you've got a stencil and you put down solder paste and then you take your tweezers and put them or if you if you had a pick and place you'd do that but for one or twozies you just place the parts on
manually by hand on those little places of solder there I show that picture because that saw that picture is a really pretty picture like that solder paste went just where it's supposed to you can see how fine that is on some of those pins it usually doesn't work that well for me so when I got one that worked like the stencil worked without any smudging or mirroring I was like oh I gotta take a picture of that and then I do I don't have a Reflow oven so what I use to melt the solders I use a heat gun and um this to me is still magic every time I watch it to watch solder paste turn to
solder not only when when the solder paste um turns to solder like you see it connect but it will actually Center some of the pieces as it heats up I don't even know this is Magic to me but you'll watch as I'm going you see how the pieces move yes that transistor is supposed to be off like that by the way but um you you'll see these pieces kind of uh shift a little sorry I'm holding the heat gun and the camera in one hand in two hands it's hard for me to keep the camera on but you can just see how watch these little resistors uh fall into place as the as it uh Heats them up
you see how they straighten up Isn't that cool like that's the coolest to me I don't know maybe it's not cool to you guys but um I thought I'd show you that because I get excited about that kind of stuff to just watch it all come together nicely um after hours of putting things down there off tweezers but yeah that video should end that's good enough um I have to give thanks to all the volunteers that helped us build these uh I know this same thing earlier we're not done but I want to just give thanks to the uh the guys that helped assemblies so when we actually ordered the final pieces most of the parts were on there
except any through-hole parts and the screen so we saw it on the screens we glued them on and then they soldered on the joystick and then the key uh the battery Ace on the back and then they hooked up all the the wiring and shoved them all in packages so we had an assembly line a lot of people helped volunteer we appreciate their help to um put all those badges together and that's the hardware side of it and then we get to the fun stuff well I don't know personally if you ask me Hardware is like black magic I'm up there we were up in the um in the hacking lab up there with the soldering
irons and stuff and I'm just looking at like wow that would be cool right and I I gravitate towards the Quick Connect because I just plug and play right that's awesome so uh big cheers out to uh to Whalen for for his great design on being able to do this um so I have never done microcontroller programming before this year of course it's near the end of the year so that does give me like I can say that I've been doing it for 12 months but really it's been more like six or seven months or something like that um we first started out with some micropython that was our previous badge that we were working on for this one we
decided to go with circuit Python and I have to say it's very easy to use okay and these bullet points were taken from circuit Python's web page you can go there get all the information that you want about that um the thing that I find very nice about it is that it uh if you if you take your badge and you plug it into a computer it will show up as a file system right and then you can just go in there and modify the files the code directly or I was actually had a saved copy of it just in case I did something stupid and then you can copy it over and the board will
automatically reboot with that fresh code that you just installed there so it's really awesome very very friendly for new new people like me so this slide would have been much better at say you know like 10 o'clock this morning or 10 30 whenever the the first session was as opposed to being the very last one um you know you put the batteries in it works you can also attach it via USBC um when it comes when it starts up this is a Rick or Morty sorry I don't watch that but uh we got the eyes looking at you right and you can control it with the the joystick moves one eye the accelerometer moves the other eye uh
there's if the the joystick button if you push that it'll change the color of one of his eyes there's a button on the back you can push it'll change the color of the other eye and that was it right unless you held down the joystick button you would see all of the other demo code that we we provided here for you um so what this uh what it goes to is a menu page that you can use the joystick to move that little ball around on the screen and then you can use the the joystick button to to choose which demo you want to run okay and so we did provide four demos there was the eyes demo my favorite was
the Minesweeper demo I thought this was really awesome I enjoyed working on it hopefully you enjoyed playing it um the neat trick with this one is that I used the the LEDs on the board to indicate how many mines you have left okay so you you move the ball around if you do one click it will reveal what's under that spot there if you do a long click or long press uh it will it'll put a flag there right and so then you can kind of keep track of how many flags and as you plant more Flags you'll see each of the LEDs turning off until hopefully you win the game I know at least one person won it so
congratulations for those who did that um okay there were other demonstrations these ones don't really I guess I could have made a video about them but they don't make good just a single picture so one of them Cycles the the the lights around and you can control the speed by just pushing on the LED or the the joystick button there there's also a Color Shifter so depending on how the accelerometer is oriented will change the color and so you can in theory rotate your badge around to get every single color that it can represent which I thought was pretty neat um and so those those are just kind of some ideas of things that we thought
were kind of neat and interesting um but really what this badge is about is it's about you it's about being able to have you go home show this to your family and say hey look at the cool things we can do now what else should we do with it right um I I understand that there was at least one person who decided that they were going to make a slideshow and so they uploaded additional pictures in that and then they just had it rotate through um you know as as Wayland mentioned you can plug and play a bunch of other components in here and then you can you can make your own code modifications to do what what you want it to do
so when you connect connect it to your computer via USBC it will show up as a mounted file system and there's the main code file is code.pi let's see are we doing okay on time yeah we're plenty um and the badge will automatically reload the code so you don't have to worry about it hopefully you get your syntax and everything correct if it doesn't it will spit out an error message for you unfortunately the screen is so small it doesn't really help so um if you know if you do run into problems that you can't resolve and you want to get back to a fresh State we have provided the code that we originally flashed on on my GitHub page and as was
previously mentioned there is a contest for best modification so look forward to seeing uh the winners of that one thing I'm going to interrupt you one thing I really like about the badge not just the Raspberry Pi Pico and circuit python or micropython on there is like he said it showed up as a file mounted file system but there's also a Serial terminal that allows you to have a python interpreter on the microcontroller so like if you have putty or you screen and you connect to the my controller you can get right to a python interpreter right there and you can be like GPO pin 12 on and if you've got an LED on it it'll turn on
like you can directly run python testing right on right off the board like that you don't have to like write a python page and save it you can test things natively in the python interpreter which is really kind of fun now you're telling me right yes it is pretty awesome and you know so to be honest you know I don't know all the ins and outs of these microcontroller programming things and so you know we can all learn together you know hopefully Wayland will always be here to help us out when we need it um however I will turn the time back to to Weyland about his the issues he saw yeah so I mentioned in there we put the
joystick on there and never tested it um turns out I put the ground on the wrong PIN for the button um it should have been to the one just to the left of it um and so we had um I'm there's this on some of your badges most of your badges probably have this little connector that's underneath the Red X like a little Bridge jump right there um and that's how we fixed it for the majority of the badges um I actually cut off one of the pins of the joystick before we soldered it down and then made that bridge instead and that kind of worked however a handful of the badges um that the the joystick even even when
I cut off the pin it was still making contact and so I had to do this other kind of connection where I removed that little bridge that you had make a little black wire Bridge from the pin of the the microcontroller and then this Trace over here where the big red arrow is pointing I just scraped it and broke it so I broke that trace and made a different path um and that's just because like I said I thought I followed the schematic but these parts weren't really well documented and so when they arrived and I realized that it didn't match up we had had to do a last minute fix to get the button to work on the joystick
also we found some other issues about the badge a lot of them won't turn on after one reboot for some reason compy kid was very kind and he helped me figure out what the problem was it turns out that the the little flash chip that I'm using with this Raspberry Pi was not initially supported luckily somebody else ran into this problem before us and so they have a branch that had a fix and so I just barely recompiled their branch and um like right four minutes three minutes before this talk just uploaded it to that same repo that Paul had right here so there's a new file called firmware.u F2 on this repo um and what you do is if you'll on the
back of the little if you're having trouble if you're not having trouble don't worry about this but if you are um there's two buttons on here one that's labeled BTN and one of those levels rst rst is reset and BTN is just button but you press them both down and then let go of the reset button and then and then after a second let go of the other button and oh after you've already plugged it into your computer if you do that then it'll reboot into bootloader mode where you can upload the new python bootloader just copy over that firmware YouTube you have uf2 file and it will reload the bootloader with the fix and it shouldn't
and it should be resolved at that point I'm sorry about that issue unfortunately it was kind of intermittent so I didn't realize it until we started getting here and people were having trouble and then it took all day to figure out what the heck's going on and why is it an intermittent trouble like that yeah and I I had to actually experience that same issue where sometimes I put the batteries in and it just like wouldn't do anything like so I figured well maybe I just need to take the batteries out and put them in and jiggle them around and eventually it worked right but yeah it's good to know that it was actually there's a fix for that on a hardware
level the fix is actually just buying that flash a few extra micro seconds before it initializes it like 60 it was like something like 64 extra microseconds just to give the flash a little bit longer before it started talking to it and it would work and so I guess some of the badges sometimes they're happy and they're up and ready in the morning and some of your badges are not morning people so uh we had to have to make that modification um we talked about that I do have some extra batteries if your batteries are dead I talked about the joystick so if your joystick's not working um if this talk was earlier I would have
told you to come upstairs to the circuits assembly room but um they've all closed up now um and I told you there's no screen information is not correct anymore I thought just throwing new flashes would fix it because it would make the problem go away but that's not true so there's a new Flash on the repo that Paul had here that's public repo b-sides Salt Lake City badge 2022 and I think that's it so a few things this is a Google Forum Anonymous for feedback this badge was totally different than what we've done in the past right we usually do some kind of challenge badge that's got some challenges but after the conference it's not very useful so if you like this kind
of new model Direction where we're having a Dev slash Hardware hacking board let us know if you liked and you missed the older type challenges um let us know or if you've got other ideas for what you want to see here next year let us know and if you're if you're uh trying to do your own software modifications or anything like that I'm always willing to uh to answer any questions or give provide advice or feedback on that you can hit me on Slack yeah so yeah same same here I think they might be moving away from the slack I don't know there's a Discord server too now I I try to be at both as long as
they're both around whatsoever but thank you guys and thanks for sticking around um do you have any questions before we sit down I think we have time yeah yeah we have time no questions that makes it easy thank you again thanks foreign