WEBVTT

00:00.000 --> 00:03.760
I haven't spoken at DEF CON in quite a while, so I'm kind of excited to be here.

00:03.760 --> 00:07.240
I'm glad that we're in this room and not one of those other big ones.

00:08.160 --> 00:09.940
How many of you have made badges before?

00:10.900 --> 00:13.460
How many of you have used badges before?

00:13.700 --> 00:15.200
How many of you like badges?

00:15.340 --> 00:17.180
How many of you like badges that work?

00:17.500 --> 00:19.060
How many of you have badges that work?

00:19.500 --> 00:21.760
How many of you have badges that don't work?

00:21.760 --> 00:25.060
Not necessarily this conference, but have you ever been at a conference and you get a badge and it doesn't work?

00:25.440 --> 00:26.480
Yeah, me too.

00:27.340 --> 00:30.380
How many of you didn't even bother turning it on because you weren't sure it was going to work anyway?

00:31.840 --> 00:42.900
So the point of this talk is because I have made a few badges and I have a habit of reusing as much as absolutely possible because the chief virtue of an engineer is laziness, right?

00:43.140 --> 00:49.460
So if I'm going to put the effort into making a badge that I can reuse, I want to make sure other people know that it's available and they can do that too.

00:49.620 --> 00:53.940
I know there's tons of badges, but like, and many of them are open hardware, open source.

00:54.240 --> 00:59.700
And rather than, of course, you know, just taking an existing open source one, I figured why not do another open source one?

00:59.960 --> 01:02.380
Because, you know, so that's how it goes.

01:02.400 --> 01:11.280
So I'm going to tell you about an open hardware badge design that I've worked on and that I think will be useful because it's been tested, been through two conferences already.

01:11.280 --> 01:13.300
It's going to be on track for a third one.

01:13.520 --> 01:18.220
And I want it to be open hardware so that anybody who wants to make a badge doesn't have to start from scratch.

01:18.220 --> 01:22.400
You can just take this open hardware, change it how you want, however you want to do.

01:22.440 --> 01:23.680
Just change the artwork.

01:23.680 --> 01:24.640
You can change software.

01:24.640 --> 01:26.080
You could keep it exactly the same.

01:26.080 --> 01:27.760
Just like change the conference name.

01:28.140 --> 01:29.080
And you've got a badge.

01:30.060 --> 01:33.680
So a little bit about badges, or me, I'm Joe, hi.

01:34.480 --> 01:36.800
I teach classes on hardware hacking and reverse engineering.

01:36.800 --> 01:40.360
I've been in Las Vegas for a week already because I was doing training at Black Hat.

01:40.400 --> 01:41.560
So I'm a little bit exhausted.

01:41.740 --> 01:46.080
But after this, I'm going to go hang around the pool, which is what I've been looking forward to for the past week.

01:47.680 --> 01:49.440
Yeah, I do hardware stuff.

01:52.240 --> 02:02.240
So let's talk about, this is what I'm going to talk about today, why we have badges, what this thing is that I'm talking about, what my vision for it is, what we can do today, and some logistics and pitfalls.

02:03.240 --> 02:10.800
And it started out as kind of like a workshop-y thing, but the space and the venue worked better for us to do kind of more of a talk slash demo.

02:11.280 --> 02:14.500
So I'm going to talk a bit, and then I'm going to show you some software and hardware.

02:14.800 --> 02:16.900
And then we'll have some time for questions.

02:16.900 --> 02:17.560
Sound good?

02:17.720 --> 02:18.840
Any questions?

02:19.120 --> 02:19.920
Everybody ready?

02:20.220 --> 02:21.420
Okay, listen carefully.

02:22.640 --> 02:23.740
What are badges?

02:24.240 --> 02:25.240
Why do we have badges?

02:25.240 --> 02:26.240
Well , it's pretty much access.

02:26.480 --> 02:35.700
Whether it's a wristband or a badge or something that hangs around your neck or something you tattoo on your forehead, we need a way to know who's supposed to be here, who's not, who paid, who didn't, who gets free drinks, and who doesn't.

02:36.220 --> 02:37.740
So we're going to have them anyway.

02:37.740 --> 02:39.320
We might as well make use of them.

02:39.640 --> 02:41.520
So we want the cool factor.

02:41.920 --> 02:43.700
This is a handful of badges that I designed.

02:43.700 --> 02:46.520
My first one over here was for B-Sides Portland ten years ago.

02:47.160 --> 02:52.680
It was a bus pirate, but the PCB shape was changed, so it was the shape of a Nyan cat.

02:52.680 --> 02:58.740
So the rainbow ribbon cables that come out of the bus pirate were like the trail of rainbow behind it.

02:59.440 --> 03:10.460
And a couple of these were B-Sides Portland, some 503 Party badges, 44Con in London, TRCon, which has kind of evolved into the Dan Initiative now.

03:11.380 --> 03:12.980
So yeah, they look cool.

03:12.980 --> 03:14.480
And you want them to look cool.

03:14.480 --> 03:22.180
And as a conference organizer, you want people to say, oh, this is a cool badge, take pictures of it, post it on social media, say, I can't wait until I come back next year.

03:22.180 --> 03:24.880
Conference organizers get more people coming and yada, yada, yada.

03:26.800 --> 03:28.200
Why else do we want badges?

03:28.200 --> 03:31.740
Electronic badges hopefully have some sort of interaction.

03:31.820 --> 03:35.780
And you can do interaction with a paper badge, but electronic badges are a little bit cooler.

03:39.780 --> 03:48.620
So this is a few years ago, Joe Grand's previous DEF CON badge, magic tokens, they had a piece of stone on the front.

03:48.620 --> 03:56.620
And he used a type of NFC, not like standard NFC, but like a near field communication, inductive communication method, which is pretty cool.

03:56.860 --> 04:02.480
But what happens, people go around, they go up to people they don't know, they interact with the badge, they meet people.

04:02.740 --> 04:05.840
That's kind of like the best part about an electronic badge.

04:07.160 --> 04:11.540
And also, like hopefully there's a lot, how many of you have ever designed a PCB before?

04:11.880 --> 04:16.840
How many of you have ever written embedded microcontroller code before, right?

04:16.840 --> 04:19.980
How many of you have hacked on a badge, an electronic badge?

04:19.980 --> 04:24.980
So hopefully the badge is an opportunity for you to get your hands on some hardware that you might not have otherwise done.

04:25.100 --> 04:31.380
So this one required a somewhat pricey programmer, but like once you had that, you could do whatever you want.

04:31.380 --> 04:38.420
There was also a serial port that you could interact with it, but like getting people to interact with tools and learn something is kind of a great goal.

04:39.620 --> 04:41.440
So why OpenTaxus?

04:41.640 --> 04:44.440
So anybody know what a badger is?

04:44.440 --> 04:47.720
The American badger, Taxidea Taxus.

04:47.820 --> 04:51.100
So this is the open badge, open badger, OpenTaxus.

04:51.680 --> 04:57.220
Not tax is like, you know, things you pay, not tax as the big state, but like taxes.

04:58.200 --> 05:07.100
And at some point I'm going to have a cool logo and it's going to be like a badger with a badge on that says OpenTaxus, but you can just visualize that right now.

05:07.520 --> 05:11.480
Or you know, go ask Dolly to make that during the talk and we can post it up there.

05:11.480 --> 05:12.700
You can do a pull request.

05:13.180 --> 05:14.880
So it's open, right?

05:15.020 --> 05:17.880
This is the URL right now, OpenTaxus.

05:17.880 --> 05:25.860
And that is kind of like the sanitized, cleaned up version that has like all the strings for specific events and all the logos and stuff removed.

05:25.860 --> 05:33.680
So you can go and like copy this and make it and not have to worry about like infringing on anyone's artwork, copyright, or all these detailed crappy things.

05:34.960 --> 05:41.600
So yeah, I'll put this URL up later, but I think it's the only thing on GitHub called OpenTaxus right now.

05:42.800 --> 05:44.420
So it's custom, right?

05:45.160 --> 05:50.640
Off the shelf is kind of cool, like if you have something interesting, but there's really not a lot of off the shelf options.

05:50.640 --> 05:58.340
And one cool one we did a few years ago for besides, for 503, DC503's badge was we had these little devices.

05:58.340 --> 06:00.660
They were like this big.

06:00.660 --> 06:07.100
They were smart response things, so they're made for classrooms where you like you answer questions , the teacher pops up on the screen.

06:07.100 --> 06:07.920
But we took them.

06:07.920 --> 06:11.100
We've reflashed the firmware with a couple games and use that as a badge.

06:11.100 --> 06:12.540
So we didn't design hardware.

06:12.540 --> 06:15.820
We just took pre-made hardware and programmed it, which is kind of cool.

06:16.620 --> 06:17.640
But this is the process.

06:17.640 --> 06:20.040
I mean, we go through prototyping phases.

06:20.040 --> 06:23.460
We, you know, have an actual badge and then like we have a second iteration.

06:23.460 --> 06:26.480
This is besides San Francisco's badge, which is essentially the same hardware.

06:27.460 --> 06:34.460
But, you know, like two conferences, two badges, somewhat similar, but it's okay because there's a lot of conferences and there's a lot of badges.

06:36.040 --> 06:38.800
So open, custom, and we also want it to be cheap.

06:39.980 --> 06:44.680
My objective is that, like, there's a lot of change in the microcontroller world lately.

06:44.680 --> 06:50.240
This uses the RP2040, which is the predecessor to the fancy chip that's on a Defcon badge.

06:50.380 --> 06:52.060
It's amazing because it's dirt cheap.

06:52.060 --> 06:57.360
In quantity, it's like 60 cents, and that includes, like, USB interface.

06:57.360 --> 07:03.420
So, like, there's a lot of extra chips you need sometimes to interface with the badge easily, and this doesn't need them.

07:03.420 --> 07:05.040
So it is extra cheap.

07:05.920 --> 07:15.220
Something else I've learned is when you get stuff assembled overseas, you know, if you go to a manufacturer that, like, does a lot of it, you know, if you wanted to assemble 100 badges, you need 100 chips.

07:15.220 --> 07:17.580
You buy those chips, you get the 100-chip price.

07:17.820 --> 07:30.720
If you go and get them assembled and you get 100 badges assembled, they get the chips at the 1,000 or 10,000 or real price, right, real R-E-E-L, which is also the R-E-A-L price that, you know, manufacturers get to pay.

07:30.720 --> 07:43.560
And so I've actually found that, like, for prototyping, it's cheaper for me to get a prototype assembled than it is for me to get the PCBs and buy the parts and assemble it myself , which is kind of a weird world we're in.

07:44.580 --> 07:46.980
So , yeah, right now, this is the last iteration.

07:46.980 --> 07:55.400
These were $5.70 each plus some engineering costs, which I think is pretty cool.

07:55.400 --> 07:59.280
$6 for a hardware badge that interacts is kind of a nice target.

07:59.280 --> 08:00.140
I was aiming for $5.

08:00.140 --> 08:07.480
Actually, I started aiming for $10, and then I went and did some cost reduction and managed to swap out some cheaper components and got it down to almost $5.

08:07.480 --> 08:09.360
So long run, $5 is the goal.

08:09.600 --> 08:12.500
Oops, cancel, cancel.

08:14.380 --> 08:16.500
Apologies for the AV situation.

08:16.500 --> 08:18.120
It's a little bit interesting.

08:18.460 --> 08:20.900
So I want to encourage interaction.

08:20.900 --> 08:23.160
So a badge has to have a way to communicate.

08:23.760 --> 08:26.380
However, we're hackers, we're privacy-minded people.

08:26.380 --> 08:28.800
We don't want these things broadcasting all the time, right?

08:28.800 --> 08:31.880
So what I opted for was infrared communication.

08:31.880 --> 08:36.420
What I like about infrared is that you can make it pretty short range, right?

08:36.420 --> 08:42.220
You can have it only work when you need it to work, and you can, like, you know, not use it if you don't want to.

08:42.300 --> 08:49.740
So this device has a little IR LED, right, right here, and an IR receiver right here.

08:49.740 --> 08:53.620
So when you line badges up, they, like, kind of flash lights at each other.

08:55.240 --> 08:59.760
And yeah, bill of material costs for the communication on this badge, $0.08.

09:01.140 --> 09:06.940
So compare that to, like, an antenna, which is going to be more than $0.08, or yeah, anything else.

09:07.000 --> 09:11.420
So I thought that was kind of awesome that I was able to get it that cheap.

09:11.820 --> 09:14.120
Braden Lane, he has done, like, e-challenge coins.

09:14.120 --> 09:20.340
He actually designed this IR circuit, and I asked him for a schematic and parts, and he shared it with me.

09:20.340 --> 09:24.760
So, you know, I appreciate his contribution to this, because, like, yeah, he was in the same boat.

09:24.760 --> 09:26.900
He wanted IR communications, but he wanted it to be cheap.

09:27.660 --> 09:31.260
I literally just got my DEF CON badge, like, an hour ago.

09:31.280 --> 09:36.040
So I haven't poked at this infrared communication, so I don't know what it is, whether it's modulated.

09:36.060 --> 09:38.240
But what this does is it basically speaks, it's a UART connection.

09:38.240 --> 09:39.120
You know what UART is?

09:39.140 --> 09:40.220
Serial connection.

09:40.540 --> 09:46.100
And, like, nothing fancy, just spit that UART over an LED, and it goes up and down, none of the modulation, no extra transceivers.

09:46.240 --> 09:48.200
And in the other end, you just have to do a little bit of cleanup.

09:48.200 --> 09:50.240
Downside, it's wicked slow.

09:50.520 --> 09:52.200
Upside, it's dirt cheap.

09:52.400 --> 09:53.280
Tradeoffs.

09:55.520 --> 09:57.700
So I want to encourage learning.

09:58.040 --> 10:09.560
And the original idea for this badge came from B-Love, Brandon Levine, and he wanted to do something in CircuitPython, because he was not an embedded programmer, but he knew Python.

10:09.560 --> 10:12.860
I had never used CircuitPython before, and so I was introduced.

10:12.860 --> 10:15.920
At first, I was like, yeah, that's a little high overhead for an embedded system.

10:15.920 --> 10:19.160
We're going to do, like, C, and we're going to maybe do some hand-coded assembly.

10:19.380 --> 10:23.000
But that's because I started doing microcontrollers 20 years ago, when that's the way to do it.

10:24.260 --> 10:27.720
25, 30 years ago, when, you know, you had to pay for a compiler.

10:28.200 --> 10:35.760
And then, you know, I kind of did work for a while, and then when I left work, it's like, oh, I can play electronics for fun, and Arduino happens, right?

10:35.760 --> 10:41.060
So now we could plug things in with a USB cable, download one thing, get our compiler and all our tools, and that was great.

10:41.060 --> 10:53.920
But now, CircuitPython, you don't need a compiler, you don't need anything, you just plug in a USB cable, you have a USB flash drive that shows up, and there's a code.py file, and you edit it, and it runs, right?

10:53.920 --> 11:00.280
So your IDE is whatever text editor you want, and, yeah, you don't have to download or install anything.

11:00.280 --> 11:01.860
I think it's amazing and wonderful.

11:02.200 --> 11:06.960
It does have tradeoffs, but, like, objective here is something accessible, something that gets people playing with stuff.

11:06.960 --> 11:08.340
How many of you know Python?

11:08.880 --> 11:14.560
How many of you can hack your way through and, like, edit something in Python, even if you don't call yourself someone who knows Python?

11:14.720 --> 11:18.460
Well, how many of you have used CircuitPython or MacroPython on an embedded device?

11:18.600 --> 11:20.000
Okay, give it a try.

11:20.000 --> 11:24.740
I actually, so I've only got, like, 80 of these with me, but I'll give them out afterwards.

11:24.740 --> 11:31.420
And so if you feel like you want to either tinker with this or think you might have interest in contributing anything to this project, I've got them for you.

11:31.420 --> 11:38.300
If you just want something to, like, hang on your neck, then, like, let people who want to work on them first get them first, and then we'll have the rest available.

11:38.300 --> 11:38.940
Sound good?

11:41.000 --> 11:43.060
So, easy.

11:43.380 --> 11:44.780
Badges are not easy.

11:44.780 --> 11:46.080
Hardware is not easy.

11:46.080 --> 11:49.160
It's not called easy-ware, okay?

11:49.160 --> 11:50.880
So, it's hard.

11:50.880 --> 11:52.200
It's going to be difficult.

11:52.200 --> 11:54.260
You need to go through multiple revisions.

11:54.440 --> 11:56.300
And, yeah, so you should do that.

11:56.560 --> 12:00.280
So, here is, so, actually, the background story for this one.

12:00.280 --> 12:02.180
This is the LabsCon 2023.

12:02.180 --> 12:05.600
LabsCon is a threat intelligence conference down in Phoenix.

12:05.600 --> 12:06.920
It's pretty cool.

12:06.960 --> 12:08.700
It's very unique and niche.

12:09.880 --> 12:17.280
But, I got home from DEF CON at, like, August 16th or 15th or something.

12:17.280 --> 12:18.440
I don't know when it was.

12:18.440 --> 12:20.440
And it's like, okay, we've got five weeks.

12:21.020 --> 12:22.060
We can do this.

12:22.820 --> 12:24.280
And we did, right?

12:24.300 --> 12:28.080
So, we've got the cardboard mock-up to kind of, like, figure out what we're going to do.

12:28.080 --> 12:30.360
We've got the little PCB mock-up.

12:30.360 --> 12:32.760
This is the IR communication circuit that I prototyped.

12:32.760 --> 12:36.080
I'm like, okay, I know I can get a RP2040 working.

12:36.080 --> 12:37.740
I can get an IR communication working.

12:37.740 --> 12:41.340
I did a PCB layout and I milled a sample one.

12:41.340 --> 12:43.660
I didn't actually mill a functional prototype.

12:43.660 --> 12:46.860
I just kind of used it to make sure I got the sizes and placement right.

12:47.420 --> 12:52.960
And then a quick turn prototyping from, I believe, this one was JLCPCB.

12:53.120 --> 12:55.860
So, for, I think these were, like, under 10 bucks each.

12:56.340 --> 12:58.520
I ordered them on Monday.

12:58.520 --> 13:00.340
No, Sunday night, so Monday in China.

13:00.340 --> 13:01.820
I received them Friday.

13:01.920 --> 13:03.460
I was kind of, like, amazed.

13:03.880 --> 13:07.200
Of course, during that time, I did, like, you know, like, little updating tweaks here and there.

13:07.200 --> 13:08.180
I added some artwork.

13:09.020 --> 13:09.580
But, yeah.

13:09.920 --> 13:12.820
And, of course, you see, you will make mistakes.

13:12.820 --> 13:16.440
So, like you see here, I've got that little blue wire that happens to be black.

13:16.780 --> 13:17.640
Because, oops.

13:19.180 --> 13:20.680
And DRC is your friend.

13:21.700 --> 13:22.560
Unless you're lazy.

13:22.560 --> 13:23.160
Then you skip it.

13:23.160 --> 13:23.720
But, whatever.

13:23.960 --> 13:28.540
And, actually, you can see up here, I had a pinout wrong for what I was using at the time, which was an IR transceiver.

13:29.740 --> 13:31.500
And, yeah.

13:31.960 --> 13:34.900
So, I had to add that, change it a little bit.

13:34.900 --> 13:35.900
Screen goes on top.

13:35.900 --> 13:37.720
I like it because it hides all the components.

13:38.740 --> 13:40.500
And that was the prototype.

13:40.500 --> 13:41.140
And it worked.

13:41.140 --> 13:41.900
Which was kind of amazing.

13:41.900 --> 13:43.560
Just one blue wire and one component.

13:43.560 --> 13:44.880
So, we cleaned up that component.

13:45.700 --> 13:46.860
Got the PCBs made.

13:46.860 --> 13:50.860
So, what I did at the same time is I did the bulk order from JLCPCB.

13:51.420 --> 13:54.280
As well as, like, a small batch order.

13:54.500 --> 13:58.120
So, what happened is I got the small batch prototypes a week later.

13:58.420 --> 13:59.120
You know, I ordered.

13:59.140 --> 14:00.380
So, I received Friday.

14:00.380 --> 14:01.560
Spent all weekend working on it.

14:01.560 --> 14:05.740
Monday, ordered the second batch of prototypes.

14:05.740 --> 14:08.800
Thinking they're going to be perfect and just work.

14:09.300 --> 14:10.840
And those came the following Friday.

14:10.840 --> 14:12.080
Which, again, is amazing.

14:12.960 --> 14:18.440
And in the meantime, finalized all the artwork and everything for the actual, like, production run.

14:18.600 --> 14:20.440
I did make a couple other tiny tweaks.

14:20.680 --> 14:23.020
Turned out we got the production run in.

14:23.060 --> 14:24.800
Took them two weeks.

14:24.800 --> 14:27.280
Was kind of incredible for a few hundred badges.

14:27.600 --> 14:28.820
And they shipped.

14:28.820 --> 14:33.520
And, actually, we had room for a week of customs holdup on these badges.

14:33.640 --> 14:37.320
Because I was renovating my house, so we were living somewhere else.

14:37.360 --> 14:46.120
So , apparently, it was a unique address that I don't know, maybe customs just let stuff go to my home address and thought that this was a different address, so it's not Joe.

14:46.120 --> 14:46.820
I don't know.

14:47.540 --> 14:50.320
That, or they put too high a price on the invoice.

14:50.980 --> 14:52.680
So, but that's the badge we got.

14:52.680 --> 14:56.000
I did have to manually solder on the battery holders and the screens.

14:56.000 --> 14:57.560
That was a time constraint issue.

14:57.600 --> 15:00.180
I really am frustrated by screens.

15:00.180 --> 15:04.880
It's very difficult to get screens that are quality and reliable and consistent.

15:05.000 --> 15:06.440
So I use modules, right?

15:06.440 --> 15:10.300
You can get the modules cheaper than you can get the bare LCD OLED displays.

15:10.320 --> 15:13.040
So I might as well just use those, right?

15:13.080 --> 15:22.460
And the second iteration, so we went from this prototype for what was LabsCon, and then B-Side San Francisco was looking for a badge.

15:22.460 --> 15:26.100
And I had a conversation which roped me into another project.

15:26.280 --> 15:31.240
And so, basically, the only change in the circuit had to do with the IR circuit.

15:31.240 --> 15:33.980
I took off that transceiver that was up here.

15:33.980 --> 15:36.000
That was an IRDA transceiver.

15:36.000 --> 15:38.720
It was a $3 part.

15:38.740 --> 15:41.540
It was there because I had it and tested it and it worked.

15:41.760 --> 15:45.760
And that's when I changed it to these $0.08 of components, which were great.

15:46.520 --> 15:47.160
So, yeah.

15:47.160 --> 15:48.760
The prototype was pretty quick.

15:48.760 --> 15:52.440
The production badges took a little longer than expected.

15:52.440 --> 15:55.820
I used a contract manufacturer that I use regularly for Tigard.

15:55.980 --> 15:59.840
Shameless plug, Tigard is a little orange PCB that does JTAG, UART, and SPI.

15:59.840 --> 16:01.840
And I make it and use it for my classes.

16:02.420 --> 16:03.760
But, apparently, other people like it, too.

16:03.760 --> 16:05.580
So, you can get it on a crowd supply.

16:07.380 --> 16:14.240
So, I had that manufacturer do it because I've worked with them in the past and they will do stuff like custom solder mask color.

16:14.440 --> 16:16.440
And what they did for this badge... Oops.

16:16.640 --> 16:17.780
Do I not have a picture of it?

16:17.780 --> 16:18.660
Oh, no.

16:18.820 --> 16:27.240
So, what they did for us for the B-Side San Francisco badges, we had two different colors of silkscreen.

16:27.620 --> 16:29.460
So, they lined up perfectly.

16:29.580 --> 16:31.960
Actually, I want to do something silly.

16:31.960 --> 16:35.540
I'm going to modify my presentation on the fly.

16:35.660 --> 16:37.640
I'm going to take a picture.

16:41.390 --> 16:43.090
You don't see this on the screen yet, but...

16:46.950 --> 16:48.030
There we go.

16:51.110 --> 16:52.090
Can you see it?

16:53.330 --> 16:54.290
How come you can't see it?

16:54.290 --> 16:55.130
It's right there on the screen.

16:55.130 --> 16:56.530
Maybe I have to go back and forth.

16:57.310 --> 16:58.230
No?

16:59.210 --> 17:01.570
I see it right here on my slides.

17:02.150 --> 17:02.790
Oh.

17:03.210 --> 17:05.190
I'm very confused right now.

17:12.070 --> 17:17.490
I hope that you've been seeing the same thing as me all along because I'm literally looking at my slides right now and it's different

17:21.970 --> 17:22.430
from...

17:22.430 --> 17:23.470
Sorry.

17:25.830 --> 17:27.370
Oh, well.

17:28.050 --> 17:31.630
This badge is cool because it's got two different colors of silkscreen.

17:31.690 --> 17:35.910
It's like a cream, kind of off-white, grayish solder mask.

17:35.910 --> 17:37.710
And then a red and a black silkscreen.

17:38.610 --> 17:39.670
We'll talk about it in a second.

17:39.670 --> 17:46.030
The reason you pay for a contract manufacturer instead of a quick turn place is they'll do things like make sure those colors line up perfectly.

17:46.030 --> 17:47.590
And they did an amazing job.

17:47.590 --> 17:49.010
It was better than I expected.

17:49.230 --> 17:51.790
We have to realize that PCBs are precision things.

17:51.990 --> 17:54.150
There is some effort to make things precise.

17:55.330 --> 17:58.230
Silkscreen is kind of like the last thing and it's usually only documentation.

17:58.230 --> 17:59.690
It's not functional.

17:59.870 --> 18:05.230
There's some more slop in the silkscreen than there is in the solder mask and metal layers.

18:05.830 --> 18:09.490
Anyway, afterwards you can come up and see some of these badges.

18:09.490 --> 18:10.630
There's a bunch here.

18:10.630 --> 18:13.050
You can ogle the artwork.

18:13.790 --> 18:15.190
So what's my vision?

18:15.210 --> 18:18.030
I mentioned before I don't like doing this over again.

18:18.330 --> 18:21.310
And people are frequently asking me for badges and others.

18:21.310 --> 18:26.950
And rather than have to be involved in the loop, it'd be really cool if I had a website.

18:26.950 --> 18:29.350
You go to the website and you type in your conference name.

18:29.730 --> 18:33.410
You upload the logo for the conference.

18:34.790 --> 18:36.070
And you click go.

18:36.070 --> 18:40.370
You get your board files, your bill of materials, your code, everything ready to go.

18:40.370 --> 18:41.390
Does that sound cool?

18:42.250 --> 18:51.210
So what you can do then is instead of having to start from scratch and go through three iterations of prototypes and test everything and find the right components, you start with something that works.

18:51.490 --> 18:53.010
And change what you want to.

18:53.010 --> 18:57.930
If you want to do board changes and layout changes or add components, you do that.

18:57.930 --> 19:00.210
But you start with a board file that's functional and works.

19:01.050 --> 19:03.550
You want to make just artwork changes, you can do that.

19:03.550 --> 19:05.110
But you've already got a board that works.

19:05.130 --> 19:10.750
If you want to keep the hardware exactly the same and change the game that it plays or whatever, how it interacts, you can do that.

19:10.990 --> 19:16.030
And that's actually what, besides Portland's going to likely use the same hardware, but they're going to have a completely different game that it plays.

19:16.270 --> 19:20.690
So customize what you want to do and keep what you want to keep.

19:20.690 --> 19:21.550
Make sense?

19:21.570 --> 19:24.690
Again, chief virtue of an engineer is laziness.

19:24.890 --> 19:31.310
So be as lazy as you think is appropriate and you'll be able to spend your time doing the things you want to do.

19:31.310 --> 19:34.290
So how many of you like PCB design?

19:34.990 --> 19:37.110
How many of you like embedded software?

19:37.610 --> 19:42.230
So you can go meet up with each other and work together or do one or the other.

19:42.230 --> 19:43.130
Make sense?

19:43.710 --> 19:44.370
Cool.

19:44.650 --> 19:45.970
So what can we do today?

19:45.970 --> 19:53.150
Because of the AV stuff, I'm going to finish my slides first and then I'll flip over to my laptop and do some walkthrough demo-y stuff.

19:53.210 --> 19:58.590
I'm not going to build a badge from scratch because it's not there yet, but maybe someone will submit a pull request and we can do that.

19:59.930 --> 20:01.070
So what can we do today?

20:01.070 --> 20:04.070
If you are a hardware person, you can just change the logo.

20:04.070 --> 20:04.870
That's easy.

20:04.950 --> 20:06.570
You can adjust the board footprint.

20:06.890 --> 20:12.790
I find the cutout shape of the board is really a neat thing to customize a badge because it looks neat.

20:13.930 --> 20:15.270
You can rearrange the layout.

20:15.270 --> 20:18.150
As it is right now, it's kind of ergonomically designed.

20:18.230 --> 20:25.750
I happen to be left-handed, but I wanted righties to be okay with it too so I put the button in the middle so all you people can use it.

20:26.830 --> 20:32.710
And also it hangs down so you see the logo and if you want to use it... okay.

20:33.110 --> 20:34.690
I still have power.

20:35.050 --> 20:36.250
I'm going to keep talking.

20:36.910 --> 20:40.510
You grab it and you point it at someone else and you trade.

20:42.350 --> 20:44.530
Ergonomically they hold each other edge-to-edge.

20:45.110 --> 20:46.690
Just making sure the screen is still on.

20:46.690 --> 20:49.170
You hold them edge-to-edge and they communicate.

20:49.530 --> 20:57.470
One of the flaws of the current design is I need to tune the IR transmission a little more because you literally have to hold them together like that for them to communicate.

20:57.470 --> 21:01.430
Maybe like a half an inch, but if they're more like an inch or more they don't work.

21:01.630 --> 21:06.310
Which is kind of good because then you're not transmitting and receiving noise and other people's stuff and whatever.

21:06.630 --> 21:16.610
Also by using a module, the module kind of shades the IR stuff so even if there happen to be lights, something crazy like that, you don't have some interference from that.

21:17.130 --> 21:17.650
Cool.

21:17.950 --> 21:21.470
If anybody's got any questions as I ramble on, please, yeah, what's up?

21:23.490 --> 21:24.850
Maybe we'll do that later.

21:24.850 --> 21:25.470
Sorry.

21:25.950 --> 21:27.250
Unless there's another mic.

21:27.690 --> 21:28.070
Nah.

21:28.070 --> 21:28.410
Okay.

21:28.410 --> 21:29.050
Sorry.

21:29.650 --> 21:32.290
I'll repeat your question if I could hear it, but I hear that more.

21:32.290 --> 21:34.690
I don't think he's asking any questions about boards.

21:35.010 --> 21:35.510
So what can we do?

21:35.510 --> 21:37.930
Change the logo, adjust the footprint.

21:37.990 --> 21:39.550
We can re-arrange the layout.

21:39.550 --> 21:46.610
So if we wanted to have it wider or different layout or if you really wanted to change the infrared to something else, you totally could do that.

21:46.750 --> 21:47.990
And you can hack it to pieces.

21:48.030 --> 21:56.390
The way I did the layout, I'll show you when I look through a key cad, is I have a bundle that's the microcontroller, I have a bundle that's the power circuit, I have a bundle that's the, what's it called?

21:56.730 --> 21:57.710
Infrared circuits.

21:57.710 --> 22:03.990
So you can drag those blocks around and route those blocks together or you can drag every single little resistor and component together.

22:04.810 --> 22:16.470
So, if you're a software person, you could change strings, you take the badge, instead of being open to access, you call it besides Gallifrey or something like that.

22:16.650 --> 22:18.510
And you can change the game text.

22:18.510 --> 22:21.210
Right now the game it plays, ever played Clue?

22:22.230 --> 22:28.130
So in Clue you have a deck of suspects, weapons, and locations.

22:28.370 --> 22:31.950
And you shuffle them, you draw one of each and you put them in an envelope to the side.

22:31.950 --> 22:33.830
And then you deal the rest out to everyone.

22:33.830 --> 22:37.910
In the process of the game, you're trying to figure out what everybody else has so you know what's missing.

22:38.330 --> 22:42.090
Same thing, what it does right now is it deals one clue to each person.

22:42.650 --> 22:48.870
And you can trade those around, you meet people, it trades the handle that you put into the badge as well as your clue.

22:48.990 --> 22:51.750
And when you get them all but one, you know the solution.

22:52.250 --> 22:55.910
Right now it's set up for eight games, but we won't go into the details of that.

22:56.210 --> 22:59.610
Besides, Portland's going to do a slightly different game as well.

23:00.230 --> 23:01.990
You can change all the game text.

23:02.130 --> 23:21.250
Right now, besides San Francisco, the AI theme they used, so it was a bunch of AI, it was a bunch of doomsday scenarios and it was a bunch of fixes, so you randomly put those together like T-800 saved something from Whopper or some weird thing like that.

23:23.110 --> 23:24.470
So, badge logistics.

23:24.770 --> 23:26.630
This can be very interesting, right?

23:27.010 --> 23:28.310
Did I miss a slide there?

23:28.670 --> 23:30.150
No, I think I got it.

23:31.750 --> 23:32.630
Sorry.

23:32.630 --> 23:36.250
So, who likes hand soldering?

23:36.390 --> 23:40.250
Who likes hand soldering a hundred badges?

23:40.290 --> 23:43.810
Who likes hand soldering a thousand badges?

23:44.270 --> 23:53.470
When I solder, I design around 0603 surface mount components because I used to be able to see them and do it by hand.

23:54.030 --> 23:56.470
I can't anymore because I'm old.

23:57.530 --> 24:00.390
So I use a microscope and I can still do them by hand.

24:00.390 --> 24:04.250
But if you're going to do something this is designed for mass manufacturing.

24:04.250 --> 24:05.950
This is not designed for hand soldering.

24:05.950 --> 24:08.610
So I use 0402 components, the really tiny ones.

24:08.790 --> 24:15.470
Which means I can fit them all on there easily and they're small and 0402 is a pretty reliable size.

24:15.470 --> 24:18.510
It gets smaller than that and sometimes you get a higher failure rate.

24:19.270 --> 24:27.590
So if you're going to hand solder what I often do is I actually will get the prototypes with all the small components assembled , right?

24:27.590 --> 24:30.310
And then I get those prototypes and I solder on the big stuff.

24:30.890 --> 24:36.630
For example, if I'm like trying to fine tune which microcontroller or I get parts locally that I want to use.

24:37.430 --> 24:38.550
Next is small batch.

24:38.550 --> 24:42.230
This is like JLCPCB, PCBWay and others.

24:42.670 --> 24:44.010
Macrofab in the United States.

24:44.210 --> 24:50.790
You just give them your design and tell them a little bit about the parts and they'll make the PCBs, assemble them for you and ship them to you.

24:51.230 --> 24:52.490
Which is pretty cool.

24:52.850 --> 25:01.210
And like I said before, sometimes it's cheaper for me to do that than it is for me to just buy boards and buy parts and waste my time assembling them.

25:02.370 --> 25:04.310
And then last is contract manufacturing.

25:04.310 --> 25:13.170
This is, you know, basically there's a weakening line between the small batch stuff and the contract manufacturing because a lot of the same companies do the same thing or outsource it to each other.

25:13.310 --> 25:18.210
Again, I have a contract manufacturer I've used for Tigard and also BitMagic's the logic analyzer.

25:18.230 --> 25:24.250
If you've heard of like NETV or the FOMU, like mini FPGA, those were all done by the same folks.

25:24.250 --> 25:28.710
The reason why I chose them is because they'll do custom solder mask colors for me.

25:28.750 --> 25:29.630
Yay!

25:30.930 --> 25:35.850
But yeah, once you're hitting a threshold of more than 100 you probably want to consider this.

25:35.850 --> 25:42.350
It will take you longer, it will cost more but it's more likely to get it right the first time which is really what you want to do.

25:43.370 --> 25:48.310
100 badges in a contract manufacturer with one mistake is 100 badges you need to rework.

25:49.870 --> 25:51.030
And finally, flashing.

25:51.030 --> 25:55.670
Once we've got these badges even if we didn't change anything we still have to provision them.

25:55.990 --> 26:10.710
I've got a flashing rig here which basically you slot the badges in it pops into a USB port and they're all connected to a 7 port USB hub and I've got a couple scripts in there that will go through wait for a device to be attached and flash it.

26:11.350 --> 26:17.610
There was a small bug in that though because what it does is it's a Linux script and it goes, okay you've attached a device , let's mount it.

26:17.610 --> 26:18.790
What's the mount point ?

26:18.810 --> 26:20.710
Okay, and now we want to wipe it first.

26:20.710 --> 26:21.590
So rm

26:25.050 --> 26:30.030
mount point slash star and then dash rf.

26:30.030 --> 26:33.870
So you want to remove everything on that drive and force it.

26:34.010 --> 26:36.970
Which is great until mount point for some reason doesn't exist.

26:36.970 --> 26:39.950
You pulled it out before you got the mount point and so that string is blank.

26:39.950 --> 26:44.970
So it's rm dash rf rm slash star dash rf.

26:46.090 --> 26:47.590
You know what I'm saying.

26:47.590 --> 26:48.550
It was bad.

26:48.550 --> 26:59.390
Luckily I was using a utility called p mount which runs as a user as opposed to having escalated privileges and running it as root and mounting because that would have been a much worse rm dash rf slash star.

26:59.950 --> 27:05.270
For those of you who are like more in the Windows world, that basically slash star is your root directory and everything on your system.

27:05.270 --> 27:07.910
So like it basically would hose your system if you did that.

27:08.470 --> 27:10.690
Yeah, that could have been a lot worse.

27:10.690 --> 27:16.150
Luckily it was discovered and found and fixed before we flashed all of our laptops instead of the badges.

27:18.630 --> 27:19.230
Flashing.

27:19.230 --> 27:20.670
We just talked about flashing.

27:20.890 --> 27:22.490
So common pitfalls.

27:22.690 --> 27:30.990
We got about halfway in which means I have about half the time to go and either look at questions or walk through the designs.

27:30.990 --> 27:32.210
Common pitfalls.

27:32.210 --> 27:34.050
I'm really going to emphasize one.

27:34.130 --> 27:35.170
Schedule.

27:35.290 --> 27:37.190
Give yourself more time than you need.

27:37.190 --> 27:39.470
Once you've done that, give yourself even more time.

27:39.470 --> 27:41.970
Add some buffer for manufacturing issues.

27:41.970 --> 27:43.970
Add buffer for an extra prototype run.

27:43.970 --> 27:48.610
Add buffer for testing and software and flashing and whatever.

27:48.930 --> 27:49.910
You'll use them.

27:49.970 --> 27:52.230
You'll make good use of them, but you'll use them.

27:52.830 --> 28:02.170
Part of the idea here is if you're starting with a known good badge, you can go get those started and get the badges manufactured and work on the software in parallel.

28:02.450 --> 28:06.290
Then you don't have to worry about getting your hardware, testing it, making sure it works.

28:06.470 --> 28:09.150
Just remove the steps you don't want to have to deal with.

28:09.690 --> 28:10.250
Cool.

28:11.350 --> 28:15.750
So, I'm going to go back and for those of you who wanted where did I put it?

28:15.910 --> 28:16.790
The URL.

28:18.410 --> 28:19.050
Somewhere.

28:19.050 --> 28:20.010
I put a URL.

28:20.430 --> 28:21.270
It's GitHub.

28:21.370 --> 28:22.090
Forget it.

28:22.150 --> 28:23.890
I'm going to switch over to my laptop now.

28:24.070 --> 28:25.330
I'll get that set up.

28:25.330 --> 28:28.350
I have some hardware design and code I can walk through.

28:29.230 --> 28:35.470
If any of you have questions, just come on up here and you can ask a question and I'll repeat it and then answer it as I do the walkthrough.

28:35.490 --> 28:37.030
Give me a moment and I'll swap up.

29:03.510 --> 29:06.310
Cool.

29:37.590 --> 29:38.310
Okay.

29:40.690 --> 29:42.830
I'm connected to this wire which goes straight to the TV.

29:42.830 --> 29:44.290
It was just where I was on a second ago.

29:46.330 --> 29:47.350
First device.

29:52.790 --> 29:53.790
Ah, checking that.

29:53.790 --> 29:54.550
Looks good.

29:56.190 --> 29:56.790
1080p.

30:04.410 --> 30:06.530
Input 1, I'm outputting to it right now.

30:11.770 --> 30:14.850
It's on the internal Google TV right now.

30:15.590 --> 30:17.290
It's showing a Google TV.

30:37.110 --> 30:40.610
Well, that's not what I want to show you.

30:40.970 --> 30:42.490
We know the TV works.

30:42.550 --> 30:44.090
So, fingers crossed one more time.

30:55.010 --> 30:57.310
More and more.

31:01.490 --> 31:03.070
Thank you for your patience.

31:28.310 --> 31:32.230
Well, that's what I get for using Linux.

31:39.740 --> 31:42.100
So, I'm going to try something.

31:42.180 --> 31:44.840
If we can get this back up on the screen.

31:48.560 --> 31:51.600
So, let's see.

31:52.320 --> 31:53.320
Nope.

31:53.320 --> 31:53.880
No, we're good.

31:53.880 --> 31:54.460
We're good.

31:54.740 --> 31:55.760
Okay.

31:56.040 --> 31:57.860
We're doing it live.

32:02.040 --> 32:04.100
So, where am I?

32:04.200 --> 32:05.800
Can I get a volunteer?

32:06.860 --> 32:08.760
Jake, come on up.

32:15.040 --> 32:17.960
Do you want to just hold it and show my screen?

32:18.000 --> 32:18.560
Just hold it?

32:18.560 --> 32:19.940
Just hold it so we see the screen.

32:19.960 --> 32:20.660
Thanks.

32:20.660 --> 32:21.560
Everybody see that?

32:21.560 --> 32:22.600
I'll make it bigger.

32:23.080 --> 32:25.160
So, there's the slides.

32:25.340 --> 32:30.080
First, let's look at... can you hear me good?

32:31.620 --> 32:35.940
First, let's look at the B-side San Francisco badge so you can kind of see what's going on.

32:36.240 --> 32:37.360
We've got a schematic.

32:37.360 --> 32:39.200
I'm not going to go into the details of the schematic.

32:39.200 --> 32:42.140
We've got... can you see anything at all?

32:42.620 --> 32:45.340
We've got the RP2040, right?

32:45.340 --> 32:46.820
We've got some flash.

32:46.820 --> 32:48.000
We've got some IO pins.

32:48.000 --> 32:51.620
We've got our IR circuit that, you know, just kind of works.

32:51.660 --> 32:54.340
And we've got a USB interface that works.

32:54.340 --> 32:57.040
USB-C, which is great because everything should be USB-C.

32:58.020 --> 33:04.380
But, let's look also... so this is what the finished badge looked like.

33:05.500 --> 33:10.300
So, this is just in black because that's what I usually do, but you see it...

33:10.700 --> 33:14.400
Silk screen on the front, no components, makes it really easy to see, you know...

33:14.400 --> 33:15.460
Can you look closer?

33:16.140 --> 33:17.160
Yeah, there we go.

33:17.380 --> 33:21.380
Makes it easy to customize it because we don't have to worry about stuff.

33:21.380 --> 33:23.280
There are a few holes, like through holes.

33:23.280 --> 33:24.320
That's where the battery connector is.

33:24.320 --> 33:25.740
That's where the USB connector is.

33:25.740 --> 33:26.900
And that's where the string goes on.

33:26.900 --> 33:28.940
But I try to keep them near the edge to make it a little better.

33:30.280 --> 33:34.680
One thing B-Side San Francisco does is they use stickers to differentiate their badge types, which is kind of cool.

33:34.680 --> 33:40.380
So, if you really just want to fab this badge as is and just make stickers for your conference, like, you can totally do that.

33:40.380 --> 33:43.100
Like, you literally don't even need a logo when you go and order the boards.

33:43.420 --> 33:47.000
But, what we've got here is the controller in the middle.

33:47.200 --> 33:54.340
Up here, we've got the Raspberry Pi 2040, some flash, an I2C connector so you can, like, attach things to it.

33:54.380 --> 33:56.480
And then, yeah, IR circuits.

33:56.480 --> 34:00.660
So, let's look at the layout.

34:00.780 --> 34:02.400
How many of you have used KiCad before?

34:02.440 --> 34:06.060
How many of you have used any circuit board design software, CAD software?

34:06.560 --> 34:09.580
So, basically, it's a whole bunch of layers, right?

34:09.580 --> 34:14.140
And you make a schematic and then you make it into the layers of the board.

34:14.140 --> 34:16.440
And you actually physically place stuff around.

34:16.520 --> 34:19.420
I had mentioned before we have, oh, I de-grouped it.

34:20.840 --> 34:22.560
I have most of the things in groups.

34:23.600 --> 34:26.400
Here, we've got the IR, TX, and RX.

34:26.400 --> 34:32.400
So, if you wanted to move that around, you can move this whole bundle at once instead of having to go and move every single component and lay it out.

34:32.520 --> 34:36.560
And we'll flip the board over, view, flip board view.

34:37.160 --> 34:41.540
Oops, and then we'll, oh boy, the resolution is just kind of making this wild.

34:45.820 --> 34:50.400
Anyway, what we see here, footprint back, there we go.

34:50.400 --> 34:51.540
So, that's the silkscreen.

34:51.540 --> 34:55.500
That's the layer that we would want to remove and replace.

34:55.500 --> 34:57.800
If you wanted to see one example of what it looks like.

34:57.800 --> 35:03.080
Of course, boards are kind of looking top-down, so it gets flipped and rotated a lot.

35:03.540 --> 35:05.100
But, yeah, that's what you do.

35:06.140 --> 35:06.940
Next.

35:09.440 --> 35:14.860
Let's go over to, this is OpenTaxus straight out of the repository.

35:14.880 --> 35:17.020
The question before was what the URL is.

35:18.220 --> 35:20.740
GitHub slash securely fits slash OpenTaxus.

35:20.740 --> 35:23.860
But if you just search GitHub for OpenTaxus, you should get it.

35:23.860 --> 35:25.040
T-A-X-U-S.

35:25.800 --> 35:27.100
What's the difference here?

35:27.400 --> 35:28.820
There's none of the logos.

35:28.820 --> 35:30.020
My logo is not on there.

35:30.020 --> 35:31.800
The open hardware is on there.

35:32.880 --> 35:34.760
The conference logo isn't on there.

35:34.760 --> 35:35.900
There is the URL.

35:36.780 --> 35:37.860
So we can see it.

35:39.900 --> 35:41.100
Take a picture if you want.

35:41.100 --> 35:41.980
I'll wait a second.

35:43.440 --> 35:52.120
Take a picture of the screen, showing the tablet, taking a picture of my laptop, showing a device that happens to have the URL text rendered as an image.

35:52.800 --> 35:54.420
I mean, I think we need to do this anyway.

35:54.440 --> 35:57.280
I would take a picture with my phone right now, but I cracked the screen yesterday.

35:57.280 --> 35:57.820
So , oops.

35:59.060 --> 36:01.680
But, yeah, you can see it's the same layout, same design.

36:01.680 --> 36:04.380
And besides, Portland is literally going to use this exactly the same.

36:04.380 --> 36:05.200
Actually, that's not true.

36:05.200 --> 36:09.920
We're going to change R11 to a slightly different resistor value.

36:11.340 --> 36:14.220
But we don't need to worry about that right now.

36:14.220 --> 36:17.680
So, yeah, and then, again, this should look very similar.

36:17.680 --> 36:21.860
This is the... get it nice and close so we get the screen as the whole screen.

36:21.920 --> 36:22.540
There we go.

36:22.540 --> 36:23.120
Perfect.

36:23.300 --> 36:25.400
So, yeah, here is the board.

36:26.640 --> 36:29.160
Blank on the back and stuff on the front.

36:30.080 --> 36:34.560
One thing I'll mention, some people kind of like to shortcut and sometimes...

36:34.560 --> 36:35.880
Oh, you can see me in there, too.

36:37.440 --> 36:41.940
You try and shortcut and say, oh, well, you know, it's cheaper if we just get the plain boards.

36:42.300 --> 36:46.120
And the default selection is HASL.

36:46.120 --> 36:50.240
It's a leaded kind of metal cover, so it makes it easier to solder on the copper.

36:50.720 --> 36:51.960
But that's leaded.

36:51.960 --> 36:56.040
And if you're doing these badges and you're handing them out to people, don't use lead.

36:56.140 --> 36:56.740
Okay?

36:56.960 --> 36:59.180
There are a lot of people who will be like, oh, yeah, I'm old school.

36:59.180 --> 37:01.260
I'm just going to use leaded solder because, you know, whatever.

37:01.260 --> 37:03.080
It tastes salty when you eat it, but too bad.

37:03.960 --> 37:04.780
Use unleaded.

37:04.780 --> 37:12.520
It exists for a reason, and especially if you're going to be handing this to people and kids, and they're going to hang it around their neck and show it to their kids when they get home, and they'll put it in their mouth.

37:12.780 --> 37:16.240
You may want to put a bit of it on there just to make it like game cartridges.

37:16.240 --> 37:18.640
But , yeah, don't use lead.

37:18.720 --> 37:19.700
Figure it out.

37:19.700 --> 37:21.460
Get the equipment and learn how.

37:21.460 --> 37:29.160
I use SAC 305 solder, which is 3% silver and 0.5% lead tin.

37:29.160 --> 37:30.120
No, not lead.

37:30.120 --> 37:30.460
Tin.

37:30.460 --> 37:31.320
I don't know.

37:31.320 --> 37:32.840
But just do it.

37:32.840 --> 37:41.660
Get practice doing it if you're a soldering person, because it's the right thing to do for people who would otherwise get injured by lead.

37:41.820 --> 37:44.860
Anyway, so let's look next.

37:45.320 --> 37:47.600
Actually, I'll skip over because it's a little more visual.

37:47.600 --> 37:50.640
This is the dock, right?

37:50.640 --> 37:53.880
And so let me try and change it so you can see the dock better.

37:53.880 --> 37:56.360
Has anybody ever used OpenSCAD before?

37:57.120 --> 38:04.820
I love OpenSCAD because I'm like a console person, and OpenSCAD is like CAD for console people.

38:04.820 --> 38:05.560
There we go.

38:05.560 --> 38:06.140
So here...

38:06.140 --> 38:10.460
What do I do now?

38:14.540 --> 38:16.580
Oh, there's a button down here.

38:17.260 --> 38:20.320
No, that was the wrong button.

38:20.580 --> 38:21.940
There we go.

38:21.940 --> 38:27.580
So OpenSCAD lets you just basically draw boxes and spheres and all that stuff.

38:27.580 --> 38:30.720
And what you can see here is I've got... oh, why is it doing this?

38:31.200 --> 38:33.560
I must have a sticky key or something.

38:33.560 --> 38:35.300
So we'll look at it sideways.

38:35.340 --> 38:37.920
I've got a groove for each of the badges to slot in there.

38:38.140 --> 38:43.660
What I also have is it's parametric, so we can change the badge size right here without having to worry.

38:43.660 --> 38:45.860
So if we change the PCB, it's pretty straightforward.

38:45.860 --> 38:47.640
I like to put the USB port in the middle.

38:47.640 --> 38:48.600
It just makes it easy.

38:48.780 --> 38:54.440
And if we wanted to do a two-column version of it, not 23, we can go do that.

38:54.440 --> 38:56.240
And bam, you've got two columns.

38:56.240 --> 39:03.580
If we only wanted to do a double one, we can do two columns and one row.

39:04.580 --> 39:06.660
Bam, just a skinny one.

39:07.020 --> 39:07.820
Make sense?

39:09.120 --> 39:13.800
I've got that up here, so when I'm done talking, y'all can come up and take a peek at it.

39:13.980 --> 39:21.800
And again, I've got badges, so if you stick out all the way to the end and you're interested in contributing something or even just want to try these things out, come on up.

39:21.800 --> 39:22.800
I didn't bring batteries.

39:22.800 --> 39:23.520
I'm sorry.

39:25.120 --> 39:28.980
And actually, now I'm realizing that there's something in my slides I forgot to mention.

39:29.000 --> 39:30.360
But I'll get back to that in a minute.

39:30.360 --> 39:32.560
The last thing I want to talk about is code.

39:33.080 --> 39:34.600
It's all Python.

39:34.620 --> 39:38.120
Anybody who's used Python, you look at this like, okay, we import stuff.

39:38.180 --> 39:42.060
I have a bunch of libraries that I use specifically for this game.

39:42.060 --> 39:44.400
And then it's Python, right?

39:44.400 --> 39:47.740
We write Python code, and it actually works on hardware.

39:47.740 --> 39:49.140
And it's pretty awesome.

39:49.140 --> 39:53.700
The downsides of Python on embedded hardware is it sucks power.

39:53.740 --> 39:55.400
It uses a lot of battery.

39:55.880 --> 40:00.420
Which is why I used AA batteries.

40:02.020 --> 40:04.180
Yeah, no, I'll go back to that later.

40:04.220 --> 40:08.000
I used AA batteries because they're cheap.

40:08.740 --> 40:12.280
And because they have a battery holder that's inexpensive.

40:12.280 --> 40:16.840
You can ship them, you can transport them, you can take them through TSA.

40:16.840 --> 40:20.760
You don't have to worry about accidentally puncturing them and starting a fire.

40:21.200 --> 40:25.980
So unless you really know what you're doing, stay away from lithium batteries on badges.

40:26.620 --> 40:31.140
It's not as bad as lead on PCBs, but I feel like...

40:31.140 --> 40:34.240
We've got a badge here that was well done.

40:34.240 --> 40:37.020
Where they actually made an enclosure and protected the battery.

40:37.020 --> 40:41.500
If you aren't enclosing your lipos, then be extra super careful.

40:41.880 --> 40:44.220
Anyway, AA battery.

40:44.220 --> 40:46.500
Actually, I started out with a triple A.

40:46.500 --> 40:50.300
I used a double A because it didn't last very long the first time I did it.

40:50.300 --> 40:53.440
But then I've added some power save features.

40:53.440 --> 40:55.980
Somehow I should be able to look down here.

40:56.560 --> 41:01.280
Right there, tiny, maybe you can see it, is some circuitry.

41:01.520 --> 41:04.540
And what this does is it takes the 5 volts in over USB and boosts...

41:04.540 --> 41:07.600
Sorry, the 1.5 volts from the battery.

41:07.760 --> 41:13.740
And boosts it up to 3.3, which means you can use that battery all the way down to 0.8 volts before the thing cuts out.

41:13.740 --> 41:16.100
Use your whole battery.

41:16.100 --> 41:18.180
I used a lot of coin cells in the past.

41:19.000 --> 41:20.460
Which is great if you have a very small thing.

41:20.460 --> 41:22.680
If you're not running CircuitPython, 10 minutes, cool.

41:23.220 --> 41:26.040
Let me wrap this up and we'll chat.

41:26.640 --> 41:27.760
It's Python code.

41:27.760 --> 41:31.240
If you know Python, you can learn it pretty quickly.

41:32.060 --> 41:34.100
CircuitPython is made by Adafruit.

41:34.100 --> 41:37.320
They're a hobbyist electronics company based out of New York.

41:37.620 --> 41:41.480
And they make reference boards, development boards, all sorts of stuff.

41:41.480 --> 41:43.640
If you want to prototype something, that's where we started.

41:43.640 --> 41:48.220
We started with a bunch of Adafruit components, prototyped on breadboards.

41:48.360 --> 41:51.100
And ended up here with a custom PCB.

41:52.160 --> 41:54.880
And the last thing I'm going to show you is...

41:55.860 --> 41:57.600
Yeah, so let's skim through this.

41:57.600 --> 41:59.960
This is basically the provisioning.

42:04.930 --> 42:05.930
Not LSD.

42:05.930 --> 42:06.670
There we go.

42:06.850 --> 42:07.950
So this is the configuration.

42:07.950 --> 42:11.470
We've got a check.sh, which actually checks when you've got a solution.

42:11.470 --> 42:14.470
The genfiles.py is what...

42:16.810 --> 42:19.190
basically generates all the files for the game.

42:19.190 --> 42:22.830
So down below, you can see we have our strings.

42:22.870 --> 42:23.950
So our company options.

42:23.950 --> 42:26.710
Terral Corporation, Neodym Pulsion, Weyland-Yutani.

42:27.010 --> 42:30.150
The startup is Algify, iTech, whatever.

42:30.150 --> 42:31.690
And the tool is something else.

42:31.690 --> 42:37.970
And the string is, blank company has just announced an intent to acquire a startup to build the industry's most advanced AI-powered tool.

42:37.970 --> 42:41.030
And the solution is randomly chosen.

42:41.130 --> 42:42.730
And it comes out here.

42:42.910 --> 42:51.450
The way it does that is, basically, it goes through the options, randomly chooses one, generates a bunch of files that go on the badges, and then it signs the clues.

42:51.950 --> 42:59.110
And gives the public key out, with RSA-512, because just enough to last you a day, without someone wasting a few grand.

43:00.190 --> 43:05.510
And that'll let you make sure that people don't mess with your game by giving out fake clues, which could screw everything up.

43:05.510 --> 43:07.850
So, I'm going to stop here.

43:08.430 --> 43:10.450
I've said all the things I think I wanted to say.

43:10.450 --> 43:12.390
If you've got some questions, come on up here.

43:12.850 --> 43:15.130
And I can continue to talk to those out loud.

43:15.150 --> 43:17.590
But you can also come on up and grab some badges if you want.

43:18.170 --> 43:19.210
So, yeah, go for it.

43:19.210 --> 43:19.750
Thank you.

