 John Park, it's time for another episode of John Park's workshop. Thank you so much for joining me here in the workshop today. We have a fun show planned, at least I think so, so I hope you enjoy it as well. And thanks for hopping into our chats. I don't know if you know this. If you're ever on Twitch or on Facebook or somewhere, you might not know where all the chat is coming from. Mostly, it's coming from YouTube and our Discord right here. So over in YouTube, hello, Dave Odessa and Johnny Bergdahl. Thanks for stopping by. And then you can see we've got a bunch of people over here in our Discord. Thin Manil and Andy Callaway. There's Johnny Bergdahl again. Hello, Jim Hendrickson. Did I mention Thin Manil? Some nice hair brain. See Grover. Nice to see you, Mike P. First. So thanks for joining up and hanging out. If you want to go to the chat, go to adafruit.it slash Discord and look for that live broadcast chat channel. We've got a bunch of different channels there, but that's where the conversation is happening during the show. So jump on over there. So here's what I'm going to do. I'll give you a coupon code that'll be good for 10% off in our store. I encourage you to buy some good stuff. I have a recap of the Tuesday show, JP's product pick of the week. I've got a new Circuit Python parsec for you today. And then I'll give you a little update on the Ambient Machine project. That one's pretty much wrapped up, but I've got the leg repaired on it and the case a little more put together. And then I'm sort of kicking off a new project, I think that's this business here. Taylor loves LEDs. I'll talk about that and show you what I'm doing. If nothing else, it's kind of a cool gear report and share, a little show and tell type of thing, but I may make a project out of it. We'll see. So first off, I said there's going to be a coupon code, and that's it right there. If you want to get 10% off in the store, head to adafruit.com, look for some products. There's a new products link. There's some featured products. There's all the browsable categories. Look for something you want, and if you want to get 10% off on the way out in the store, just type that in right there. Swiftie, that will get you 10% off. You don't actually have to be a Swiftie. I don't know if I consider myself a Swiftie. Does everyone know what I'm talking about here? This is Taylor, Taylor Swift. My daughter, as they died in the wool, Swiftie, and she managed to bring me to the concert the other day, the Taylor Swift concert. So we'll talk about that. Yeah, that's what this is about. That's what these LEDs are about. Not John Taylor, basest for Duranduran as Todd Bot posits. But Swiftie, that's what the fans, the Taylor Swift fans call themselves, Swiftie, that will get you 10% off in the Adafruit shop. It looks like that. Jump on over to the store there. Check out products. Check out gift ideas. What's new? There's what's new, a bunch of cool stuff. Look at this, Adafruit Metro RP2040. I've got to get one of those. I don't have one of those. Love that. That's going to be good. So yeah, on your way out, just this little coupon code field, type that in, Swiftie. And that's going to get you 10% off there. Let's see. Plenty of song lyric puns going on over in the chat. So thank you. That'll probably go on for quite a while there if you've got favorite Taylor Swift song lyrics to throw in or song titles to throw in. Jump on over. So next up, I mentioned I've got that show right there on Tuesdays. That's the JP's product pick of the week show. And it's a lot of fun. I get to pick something from our store, usually something that's brand new, sometimes an oldie but goodie, and build a little project around it. Put it through its paces a bit. Show you how it works. Show you how code works if that's a thing with it. We usually give you 50% off, up to 10 of them. And there's no coupon code needed on that one. You just throw them in the cart. They're priced just during the show. They're priced to sell. And here's a little one minute recap that I will share with you now. It is the TRRS Jack breakout. That's what I was working with before. Now we have that. And you can plug in your TRRS cable. Here is a little Altoid tin MIDI converter that I built. I've got a QT Pi. And I've got my TRRS Jack, TRRS Jack. I'm using it to send MIDI data. And so for that, I'm using a TRS cable. And that works fine, stereo cable. I'm going to use the QT Pi to play a couple of arpeggios and then change the patch. So this is just serial UART data. That is my product pick of the week this week. It is the TRRS Jack breakout. Yes, it is. I was just going to answer a question from the chat over there. David Esso said, not doing the job vacancies part of the show anymore. Yeah, that's right. We are reworking the job board. So I don't think we have new listings in there currently. When that gets finished up, I will start doing the help wanted segment of the show again. Thank you for the question. All right, let's see. Next up, how about a little circuit Python parsec? Yes, circuit parsec. Let me, uh-oh, have I broken things? Yeah, that's not what I'm showing. Hold on one second. Let me add. Oh, I see what I did. Hold on one second. We'll add a screen capture. Screen capture. No, oh, I broke this sublime text one. OK, let's add a fresh one. Black hole, fix, not monitor window. Figure and sublime text. There, right over there. Hey, cool. And I think that'll do it. Do I? Yeah, I don't need to do anything else. OK, we're ready to go. That's some old stuff there. For the circuit Python parsec today, I wanted to show you how to use the circuit playground library buttons function. So circuit playground library gives us these high level, easy to use commands that work on the circuit playground blue fruit and the circuit playground express. And it is a high level set of commands that work inside of circuit Python, but specific to this board. So you can see in this example what I'm going to do is use one of these two buttons. So we have a couple buttons on the front of the circuit playground blue fruit and express. And if I want to use those in the circuit playground library, I can use this from Adafruit Circuit Playground, import CP. That brings in the library that gives us all the commands for all the stuff on the board. Then my main loop, there's no other setup. My main loop is if CP.ButtonA, meaning that's true, it's been pressed, then CP.RedLED is true. And that's what's turning on that little red LED at the top of the board. When that button is false or not pressed, then it sets the LED to false. Now you can even do this in a slightly shorter way. It's a single line right there. CP.RedLED equals CP.ButtonA. So if I save that code right there, you can see this is essentially three lines. Let me get rid of all the, there you go. These three lines are all we need to do to light up an LED based on a button press right there. Now if you look at what an example of this would be using normal circuit Python, you can see here we have quite a bit more code to do in boarding time, board, digital I.O. LED is being set as an output. The button is being set as an input. Oh, no! OK, I'm going to have to restart that, aren't I? I never pushed the code over. OK, thank you for the notice. All right, we'll try that again. Thanks, C.Grover. Thanks, Tyath. Thanks, Andy Callaway, Mike P. Everyone who noticed that I had the wrong stuff up. When I add a new screen to the broadcast software, it shows up in my preview monitor, but it doesn't get pushed to the actual stream. So now I've pushed it. OK, so here we go. Ready? Take two. For the Circuit Python Parsec today, I wanted to show you how you can use the Circuit Playground Library to make it really easy to use buttons. And those are the buttons on the Circuit Playground Blufruit and the Circuit Playground Express. Inside of Circuit Python, we have the Circuit Playground Library that makes it really easy to use the features there with simple commands. So here, in this example, what I'm going to use is this button here, button A. When I press it, I'm going to light up a red LED. The way this works is I have from the Adafruit Circuit Playground Library import CP. That brings in all the commands to use the stuff that's built onto this board. Then in the main loop of the program, it's really simple. I say, if the button is pressed, or CP.buttonA is true is what's applied there. Then CP.redLED is true. Otherwise, when it's false, when the button's not pressed, then the LED is false or not lit. Now you could do this even more succinctly with this line right here, which means that in just three lines of code, we import the library and then we set up the while true loop. I am saying the CP.redLED is equal to the value of CP.buttonA. So if I save that, give it a moment to restart. Loads in that whole library, which is not small. Now it's ready. When I press the button here, we get the red LED. Now you can see here, this is an example of what it would look like in straight circuit Python. So it's a whole lot more code to do basically the same thing. Now I'm going to show you a second example here, where I will go ahead and comment all that stuff. And I'll save this while I'm explaining what's going on here. Same thing. I'm going to import the circuit playground circuit. Sorry, I'm going to import the circuit playground library, CP. Then I'm going to set the CP.pixels. That's all the neopixels on the board. Brightness level, film to black, turn them off. Then my main loop, same sort of things. At this time, I'm using CP.buttonA and CP.buttonB. So when A button is pressed, I'm lighting up some of these LEDs on the left here in yellow. And then when I press the B button, I'm lighting up some of these LEDs on the right in blue. I can also set up something to pay attention to if I'm pressing them both at the same time. So if A and B, then we'll fill everything with this sort of pink color. But we can go back to individual presses. And so that is how you can use the buttons on a circuit playground, Bluefruit or Express, in the Circuit Playground Library in Circuit Python. That is your Circuit Python Parsec. Blah, blah, blah, blah, blah, blah, blah, blah, blah, blah. Yes, Circuit Python. Thank you again so much to the astute viewers who noticed that what I was talking about was absolutely not what was on screen there. Must have been a bit of confusion there for a moment. So thank you for that, for keeping me out of trouble. OK, so next up, let's talk about this, actually, let's start with, I'm going to just go to this screen here. I want to grab my ambient machine and just show you in kind of its final state. I think I have one last little piece of wood I'm going to cut out in the back to fill some of these gaps here. But I've got a little colored paper on the front there now. I re-glued and clamped the foot that fell off. The others could, too, because I didn't clamp them the first time. So we'll see. I may have to deal with that. Also had to sand to the bottom of one of those feet a little bit so that it wouldn't wobble. But now we've got it standing nice and straight, no wobble, which is good. So I am working on the guide for that. You can see here I added the USB port there. You can see the speaker shining through there. And this now gives us five sounds and five volume changes, another five sounds, another five volume changes. If you remember, I think I may have talked about this on the show or on show and tell, I was also testing to see if we could use an SD card to hold the wave samples. SD card I.O. is the only SD card library available for the Metro M7. And it probably will stay that way. We'll see. It's not fast enough. It does not allow us to open enough waves at a time for that. You might use it for another program, another project where you have just a couple of them. But I was able to get, with some help from Jepler, some speed improvements that allow two or three sounds to play at once. But we start to run out of memory. We start to get some crackling and things like that with the buffer sizes that were helpful. So I'm sticking a flash ram on this one. We'll see. Maybe we'll revisit that. But it's enough for the 10 sounds that I have on here, which is great. They're fairly short looping, mostly seamless looping sounds. So it works pretty well. Let's see. There was a question. Mope. The question is, what's the name of the box that it's built in? It's the mope. Ikea mope box. I think all the rest of them, here's the one that I started to stain that I don't love the stain. This little drawer's mope, right? I think that's it. It's the phrase that pays. That should always be an active coupon code, actually. But it's not. So I'll try it. Thanks for that. So I'll be working on that guide, and we'll share that soon. And you can build your own, if you want, or a variation on that. OK. So now, let's get to this Taylor Loves LEDs. Oh, thank you, Johnny Bergdoll. He says I nailed it. Johnny is Swedish, so he's the authority on Ikea names and other things Swedish, I would presume. So Taylor Swift Era's Tour Concert, I got to go to the show a couple nights ago here in Los Angeles at SoFi Stadium. Amazing show, mind-blowing. Three and a half hours of just nonstop entertainment. She's incredible as a performer. The show was gorgeous. Look it up online. I won't show it here. We'll probably get copy strikes and things. But it's a stadium of about 70,000 people. And the floor extension, main stage, all of the set pieces are LED wall. So there's just incredible amounts of live video and composite effects going on, as well as your typical big concert stage lighting, fog machines, smoke machines, fireworks at some point. So the full AV, everything experience. Really cool. And one of the things that they do that a lot of these concerts do these days is they hand you a wristband on the way in or a, and I didn't get to do this, but someone I know went and was able to go on the VIP level. So for VIPs, you could get this badge that has LED light up stuff. And for regular seats, you get handed one of these on the way in with a little bit of advertising and a QR code for the sponsor. But it is a little inexpensive. I think these cost between $5 and $10 for the tour or the venue. I don't know who pays for that or the sponsor. Everyone gets one of these. So 70,000 or so of these things where these go out. And they all light up when the show wants them to light up. So you all become part of the lighting experience. When you go home, by the way, I'm going to pull out the little battery tab that I inserted in there to preserve battery. You can see, you might be able to see this better if it's glowing. You can see it goes into like a home mode, which is a pulsing blue. And this has, let me go to my down shooter, a pair of LEDs, so you can see them a little better, on the corners there. And that's about all you see there. If you peel the band back, and actually it slips out of the side here, you can see this says, picks mob on it. Please return after event. Oops, I didn't do that. Designed in Montreal, made in China. And I have not disassembled one yet. These are sort of heated, little heat set rivet, kind of the plastic has just been melted, basically, to hold that in. I didn't want to take them apart yet. I may do that. But you can find some nice teardowns online. We'll look at some of those in a second. But the interesting thing about these is they're not just blinky effects, like you see right now with this home mode. During the show, these are part of the lighting design. So there will be essentially effects sent to these. So you may see all of them turn red and sparkling in the crowd. You can see color washes run through. You can see sometimes big shapes, like 5,000 of them have been turned into a big heart. And you're wondering, well, how the heck are they doing that, especially at this type of price? So I looked into it. And so picks mob is one of the leading, especially in North America, I think pretty much all the concerts are this. I think there are a couple of other brands out there. I don't know. They probably weren't the first, but they had certain innovations. So anyway, go look that up if you're interested in this space. I'm not trying to endorse this as the one and only. But the picks mob, they have a few versions of these. Some of them work. The most expensive are, I think, some wands that they hand out at some shows that are, I think, Bluetooth for communication. There are, the least expensive ones are some sort of RF version of them. And I don't know why that's the least expensive, how they're broadcasting what they do with them. It might not be able to do quite as much. And then these, these are kind of the sweet spot. These are, like I said, inexpensive. They use infrared. And so there is an infrared receiver. And actually, I'm going to go show you just some pictures from one of the many teardowns that you can see out there. This one that's in this person's hand here actually is a good illustration of, it's not exactly the one that I've got here. This is, I think, called the X3 model. But what you can see on these is there is typically a pair of neopixels, essentially, RGB LEDs. Oh, there's a good picture. OK. This one you can see here from this Hackaday article, this is one of the wristbands that looks a little bulkier. And it's got an infrared receiver. So you can see right in the middle there, big sort of tinted plastic dome. So it's a filter that filters out all light except for IR. And it's going to receive blinked messages, just like your TV remote. And then a pair of LEDs on these there, as you saw there on opposite corners. But this is one where they put it down the middle. And then there's a small microcontroller on there and some passives. There's a coin cell battery on the back. And that's about it. So what these do is receive infrared messages that tell them what pattern to go to or essentially how to blink what color. Are they fading? Are they still? Are they going to randomly choose to accept the command or not so that they can, from the lighting towers or the sound towers where the speakers are, they have pan tilt head spotlights that are just sending IR signals. So it's a big LED array of infrared transmitters, 940 nanometer. I think that's the units for it. The 940 nanometer wavelength IR LEDs. And they can send a command out to anything that sees it. So they can point this in a tight spot and you will just see a few hundred people's risk bands lighting up. Or they can make it a wider wash. They can even put gobos on it. So the heart, they will put a shaped gobo, like a cookie cutter in front of the spotlight. And they're able to send just a heart-shaped pattern, essentially. So they're just saying, turn pink. Everyone who sees me turn pink. But they can change that shape of which of the risk bands can see, which is pretty great. They, based on this, apparently send, at the end of the night, as the concert finishes, they send a wash of LED messages, IR messages out to all of them that say, you're going home now. It's called the go home mode, which just means blink and fade for a couple of days until the batteries die. Or if you short the battery out of there, not short it, but disconnect the battery by wiggling a piece of plastic in there, you can do that intermittently, probably for a long, long time. So these are essentially just going to blink and die. It's partly why they want you to just give them back, because they can recycle them. They don't want a bunch of waste, which is smart. But the nice thing is, some very clever, hardworking people out there have reversed engineered a lot of the messages that are used here. So by going to concerts, I think Cold Play is a band that's done a lot of really advanced stuff with PixMob bands. People have gone to their concerts and made their own infrared receiver recorders so they can just get a big data dump of the messages and then did the hard, hard work of figuring out the protocol, packaging up some nice scripts. There's a Flipper Zero, a little Flipper Zero device, I think was used to record these. And now there are also Flipper Zero controllers to send these messages back out to your wristbands that you've brought home. So this is really fascinating. This is a Daniel Weidman, W-E-I-D-M-A-N. I'm just going to put this in the Discord chat for anyone who's interested. This is the real hardcore work that's been done here. So from this, I didn't try this code, which is some Python scripts on your computer and an Arduino. So you're sending serial commands to the Arduino, which is just doing the LED blinking. But someone else took these IR codes they made for the Flipper Zero version. So on Flipper Zero, there's a little infrared send program. And they have this little text file. They call it a .ir file, which gives you the commands. So if you look here, these are some of the commands, such as, I just want to turn the LEDs red on a wristband, any wristband that can be seen. So frequency, 38 hertz, duty cycle, 0.33, and then the data. So that's essentially the high-low data square wave looking pulse wave. That's the blink pattern, kind of like a Morse code blink pattern. We've seen this before with TV remote types of stuff. It's actually a little simpler. And so you can see this one will just send, hey, be red as long as you're receiving this message. And the kind of nice thing is that as soon as the wristband doesn't see that message, it just turns off. So that's a way that you can do a spotlight wash through the crowd with just a color command. These are actually red fade 1, 2, 3, 4, 5, 6. These are six different fade patterns, essentially speeds of fades. So again, all the wristbands that see red fade 1 are going to do kind of a fast pulse of red. And then if you shoot them with red fade 6, it's a slower pulse of red. And if you stop pointing at them, I think they finish a cycle, and then they turn off. Andy Cowley says, I guess you could build your own then brighter than everyone else's. Yeah, you could get a couple 3-watt LEDs. That would be fantastic. Oh, I really like that idea. So these commands here are colors and color fades. And then there are also some special ones here, which are rainbow patterns. Maybe we'll try one of those today. So like I was saying, these are some commands which then this person, D-R-N-E-O-X, Dr. Knox, I don't know, I'll put that link in the chat as well. They wrote, made a little circuit that does some beat detection of music, sound detection, and just sends out random color commands using those codes that were figured out on the main repo there. So I took that and just kind of pulled out. This is an Arduino. I pulled out just the code that we need to send some colors or some fades. So this is my, let me grab my Arduino here. This is the code here. Pixmob Music Rhythm by Carlos Ganoza Placencia. Thank you for creating this and sharing it. You can see here, it's using a library based on Ken Sheriff's IR Remote Library, which most IR projects in Arduino are based on that. This is a fork called IR Remote ESP8266. I'm not sure the reason for forking that to do it on the 8266, but just to make my life easy, I grabbed a Feather Hazah ESP8266 so that I could run this without worrying about modification. So it uses this library. We set one pin to be the output pin for telling the infrared LED or array to blink. And what I'm using is you could probably, so let me switch over to this bench cam for a second. And head over here. So while I go over there, I'm just going to pull up the chat on my phone so I can see if I do anything silly. And I'm first going to tell my display not to turn off. Never turn off. Discord. All right, here we are. So what I'm using is this lovely little stemma, three pin stemma, connected breakout board called the 940 nanometer infrared LED emitters. It has a front-facing, let's set this down here, so sort of forward-facing LED and up-facing LED, which means you just get some better coverage, or if you needed to put this in an enclosure, it gives you more options. If you wanted to, I think there's a trace you can cut to turn off one. You can also, if I'm not mistaken, use one of these super bright 5 millimeter IR LEDs that we have. I think that can be used in these two pins. I could be making that up. We'll check the product page on that. It just happens to be stuck to a battery from a previous project here. I didn't want to pull that off. But that, you can see I'm just using a feather quadrupler here because it was a convenient way to do it. But that has my pin 5, which on the ESP8266 Feather Hazard, that pin right there. It's the same as the serial clock pin, I think. So that pin there is my pin 5, and then I have 3 volt in ground. All that's what's running to this demo there. And then I put that code that I was showing. Well, maybe we'll return to that in a second. Let's just take a look at a demo of it. So here's another one of these wristbands here. Zoom out just a little bit. And I will unplug my little battery saver there. And you can see this one's not doing anything. So that the one I showed you a second ago was pulsing because it had the go home code on it. I no longer have that on this one because I've sent it another code. So I think the go home code is like fade blue 3 or something like that. So I think that's all they sent. And that will that blink forever? I can't remember. So let's find out. So what I'm going to do is plug in power on my feather. And so you can see now I've got this fade going. I also have a second or so of nothing. Now, interesting thing is, fun thing about these is that here's a second one. I happen to put this on a wrist strap so that it was easier while I was developing to just have this on my wrist, like a watch band. If I pull the battery on that one, uh-oh, there you go. These will be in sync, perfectly in sync. In fact, we'll try out some code that blinks faster. And you'll see they'll always be in sync because they're not doing much thinking. They're receiving this IR command real quick doing what it says, which is pretty cool. So you can imagine if we zoom out a little further and I'll put one of these up on a stand, that in view of the camera. Stay. So you can imagine if we, I'm going to cover my top LED and move this one over here. We might get too much IR reflection to do what I want. Yeah, we're getting IR reflections, which is too bad. Let me do it this way. Instead, I'll just cover. You can see if we cover the infrared port, that one's not going to blink. As soon as that comes into view, it'll blink, which is a little more impressive when we put it on instant on. So let's try that. So what I'll do, let's bring one of these over here. And we'll go ahead and plug this in to the software to play around with it. The one thing I will warn is that uploading to that 82.66 is a little slow. It's not a native USB on there, and so it is a little bit slow to get these to receive your compiled Arduino code. Let me focus that again. OK, so here in code, you can see I have, I've just kind of converted some of these messages that we got from that GitHub repo. You can see some of them are longer, some of them are shorter. So what I'll do, let's just tell them to be red. And I think I have, in my main loop here, this is all it's sending right now is turquoise fade 3, and then it specifies the length of the array, and then the 38,000 hertz frequency that it's using. So if I just say IR send raw about pink, sure. And just so that it's not spamming it at dangerously high levels, I'll set this delay to about 100 milliseconds. With 100 milliseconds, I'm not able to perceive a blink. Maybe the camera will, we'll see. And let me try to upload that code there. Here we go. So you'll notice while the Arduino code gets uploaded to this board here in a second, it will stop sending the IR. So we're no longer getting IR commands on the wristband. So we're about halfway there. You can see that's the feedback there from our upload to the board. I wish it were faster. OK, so now this is just this pink, which is a very white, very light pink. Let me try to saturate this a little more. Yeah, it's just very bright. Dump, dump the exposure. Oh, well, take my word for it. It is pink. You know, did I have them? Yeah, I won't bother, it takes too long. So here, you'll be able to see. Let's see if I can show it on. So I'm going to point. So the message is being constantly sent. I wish I didn't have, yeah, that webcam has a filter so we don't get to see the IR. But that's going to be just basically kind of a bluish, purple IR constant. But if we sweep across the crowd, you can see it will light those up only when we're pointing at it. Let me move it more quickly just because I'm bouncing. So you can see that. That's probably as fast as we can get it to go. So if I grab this other band over here, and let's see, how can you? You can see the glow. You can see the glow on my face, that's the best way. So hey, this side of the crowd, that side of the crowd. Hey, ho, hey, ho, right? So imagine if we have a huge array of these and we're able to shape that beam using a gobo, and there's just 1,000 people, then you get to just send any shape you want, which is fantastic. Really, really clever. Yeah, Todd, I agree. Idea of sending data via IR to thousands of people. Amazing, so clever. So now if we look at, let me go back to my Chrome window here. Let's grab one of these. I haven't tried these yet, so let's grab one of these fancy codes, like a rainbow. And I'll show you how we can get that to work. So weird 43. What are those? Oh, I'm terrified of those. New yellow int, maybe. Green blink, old dim red. All right, let's grab a rainbow. Fine. Don't we have a tasteful gradation? Does it have to be a rainbow? Oh, well. Oh, you know, motion, that worries me, because I think some of the earlier bands had a motion detector in them as well. And I've heard you can kind of brick these things if you're not careful. So let's see if we can find anything that's interesting that is not using the motion stuff. These are just straight colors. You know what I'll do? I'll put back the little tabby thingy in one of these. And in the name of science, we'll try a weird one. All right, weird one. What's your deal here? So what I've been doing for these is just grabbing this data string here of numbers or a list of numbers and going over to a text editor, paste these in, and try to do a, OK. So can you see that? Down at the bottom there, what I did is I'm searching for space. And if you have a bunch of these, you can just search in the selection. In this case, it's the only thing here. Searching for space, I get 34 matches. So that is a really quick and dirty way for me to find out how many are in here without having to count them or write some software to tell me how many are there in there. So that's how I figured out how many spaces there are. So in, can I do a replace here? I don't use this, where's your replace function in here? I don't use sublime text, normal use, Adam. I want to just replace all of those spaces with a comma. Looking that it might just be replace in edit. Where are you? Find, find in files. Quick, replace. Here we go. Good. OK, so I'm going to find a space, and I'm going to replace it with comma space. Oh, by the way, so I said 34 spaces. That means there's 35 items in the list. Replace all, OK. Copy that. And now I'll go back to Arduino there. And we'll just define a new one. This is weird one. Oh, gosh, I'm scared. So you int 16, I said what, 35 entries in this array, and then a pair of curly brackets, and paste, and don't forget the semicolon on the end, because I always do when I come back to Arduino. All right, so let's try compiling that. So it'll tell me, hey, you told me there were 35 in this array, and there are not. So what did it say here? Oh, do I? What did I do? Doesn't like something. Oh, I misspelled you int. That's why it wasn't green. All right, let's try recompiling that. Oh, thank you, Mike P. I missed that. You said control H is the replace on sublime text. OK, it compiled. Yay, so now let's find out what weird one does. So I've got the one with the go home code still on it that I'm not messing with. And this one I've put the tab in. So the only one that we can mess up is this little guy right here. Absolute you int, you're right. OK, here we go, connecting. Yeah, this uses a SyLabs serial to USB, since there's not native USB, on the 8266. And so that's what gives us the slower compiles. I think I'm going to try a circuit playground express. This is a blue fruit one, but the circuit playground express right here has a little infrared. It won't be as powerful as that, but it does have a little infrared transmitter. Also has a receiver on there. So I'm going to see if I can get this running in Arduino on there, that's the M0 chip, 32U4. That'd be kind of cool, because I'm going to get some buttons so we could pick different effects. My Neopixels on board would tell me what the color is. That kind of thing would be a lot of fun. OK, what does it do? Nothing. It turns off if it doesn't see the IR beam. Wow, I really can't block that IR beam well enough. Or is it just doing something on the plug? Was it sent a message? No. OK, so it doesn't have a persistent thing like that go home on it. So don't know what weird one is. Weird one may be for a different wristband, too. That's kind of another possibility there. Oh, wait. I didn't tell it to run that. It's just running pink. That's why. Who noticed that? I'm sure someone did. So that's my problem right there. So we will do a new loop here. Sorry about that. IR send, send raw. That is 35 messages in the array, bits in the array, 38 hertz. I'll put a little delay. So what I've found, I think, is if the message is something like a fade, you can send it in rapid fire. It's going to run the full message before it looks up and says, OK, do you have a new message for me? It's OK to still have a short delay in here, even if this is meant to be some sort of an effect animation. All right. Yes. This time I think I'm telling it to actually do the thing we wanted it to do, refocus this while we're at it. Oh, that's exposure. All right. Does that do anything? Maybe not. OK, weird one, not performing. Let's see if it bricked it. That could be exciting. Oh, I see people typing in the chat. Let me know if you've noticed a mistake here. Oh, retired wizard said, none of the weird messages do anything with the wristband I have. Well, thank you. Cool. I'm curious, what are you using the Flipper Zero or what way are you talking to your wristbands? Yeah, we don't have weird wristbands. OK, so let's should we try rainbow? Let's try rainbow. First, we'll see if I bricked it. So let's send. OK, so here's like turquoise fade four. And I'm going to give it, let's say, a three second delay, which means it'll send the thing. It'll run fade for however long it is. If that happens to be less than three seconds, then we'll get a little pause where it's off. And then it'll run it again. So let's try turquoise fade four. Yeah, so Mike P asked the question, Mike P, how does it ensure that the bands are in sync? And Todd answers, this is it. They both receive the same message at the same time. So it's as if you had two Sony TVs in front of you and a Sony remote. If you hit change channel, change channel, change channel, they're both just going to go through it. This is why I say you can't interrupt an animation. The wristband does not ask for new messages while it's busy playing through an animation, which is really smart. So that means that if there's one that's gotten the message, it'll start, fade, go off, then they'll both get it. So it's super clever. If the signal is sweeping across the crowd, some would start later than others. Yeah, so if, no, I should say, if any two see the same message, they will be in sync. If you sweep across any that are in view, we'll do the blink. And then when some other ones get the message, these ones will keep going or stop, and these other ones will start. So essentially, the send of the message is the key to this. And everything is in sync as a result. But yeah, if you're moving fast enough, if you're moving it, let's say, at half the rate of a fade, if a fade takes two seconds and you're moving across, you could get fade, fade, fade, fade, fade, one second out of sync with each other as you cross. So here, we're getting a really nice slow fade there. And then I have my a couple of seconds of delay as well. So if I turn that down, let's send this just a small delay, mostly because I didn't want to flood serial ports when I'm looking at print statements and things like that. But just to have a little delay in there seems reasonable. I could be wrong on that, if I'm paranoid. Sorry, this camera is not picking up how beautifully saturated these colors are. I'll put the wristband in front of it a little bit so it maybe gets some reflected light. How's that look? You can kind of see it as it gets darker. You can see a lot of green in there. OK, so let's try rainbow. This will be the last one that I attempt to convert. Was there anything after weird? What's this one? New random color sometimes. New random color sometimes fade no tail. Well, I like that they say new. New preset, preset, green, then yellow, then off, old. New red, white, rate limited. And sorry, I don't know a lot about this, so there's definitely some things. Some tinted acrylic I could put in front of it. Sure do. I usually have a piece right here, a big piece right here. Oh, no, that's not LED acrylic. That's just straight up opaque acrylic. Question is, do I have a non-huge piece? Is this LED acrylic? Yeah. Or bounce the light off a white piece of paper yet? I've never checked. I'm assuming that this LED acrylic won't filter the IR out. That would be unlikely, I think. So this is a huge piece of LED acrylic here. That's better, right? And you can see, yeah, it's happily still getting those messages blasted to it. Looks like a little jaw-war or something now under my desk. That's terrifying. New rainbow color sometimes fade no tail. New rainbow color sometimes eight. Why is sometimes? Oh, OK, sometimes might mean when the message is sent, everyone sees it, but they don't want them all going off. So this is how you can get kind of a sparkle effect in the audience. I bet that's what those are, is they allow the device to randomize when it's going to play it or not while it's receiving it. So we'll try a new random color sometimes four. Yeah? Let's do that. So back here, paste that, get rid of this, select all. Let's try control H. Oh, I'm on a Mac, and that just went and hid the application, sorry. Oh no, what have I done? What's happening? Let's see if I can get it back. Oh, jeez. Sublime text, you're gone. OK, you won't get to watch this part, sorry. I'm going to. Oh, there it is. I did command. You probably say control H, didn't you? Nope, I made a new one. All right, I don't know Sublime Text, so pick all that. All, it is again 34 in this one. Was that the new message? Yeah, replace, replace space with comma. Would I say this is 34? So it would be 35. OK, copy that. Back to Arduino. Mac PC moments make me chuckle. Yeah, the system-wide hide thing. I think I've turned that off on my other machine, but I'm not on this one. Suddenly, when an app suddenly disappears, it's terrifying. What just happened? All right, so this is going to be Uint16T. What do we call this one? New random sometimes, we'll say. Random. New random sometimes 35. Also equals pip, pip, burp. Put a semicolon at the end there. Pium. And we will say send that. irsend.send raw new random. Not again, sometimes 35. Oh, no, 35, 38. Close paren. Delay. Check our work. There's no reason to compile and then press the upload button because that also compiles first. But for some reason I do. All right, let's see what happens. Anyone else? Oh, retired wizard said Weird 9 gave you some mixed coloring. That's cool. Yeah, as I was walking out of the stadium from the concert, there was a bag of probably 200 of these that people had said yes, recycle. Had I known what I was going to attempt here, I probably would have tried to walk off with the bag of them. I might have gotten stopped by security there. OK, so that is doing nothing. But what I'll do is let it cook for a minute because if that's what I think it is, there's meant to be some randomness where sometimes these decide not to go. Nope, I don't think so. Either I've screwed something up or that code is not recognized here or there's something else. There's something else. But I think that's it. Other than running, here was actually kind of a nice way to do this is just to run through some solid colors. There we go. This will, yeah, I'm going to use this IRDelay variable. I made so we can try different speeds. So do yellow, green, pink, blue, blue a second time. I don't want blue a second time. Oh, that's red. That's just, that was wrong there. OK, so yeah, let's set the IRDelay to, let's say, 300. Should give us a cool blinking, color blinking. So it says, don't mind me, Mr. Security Guard. Sir, I'm from badge pickup. I got to get these back to Canada stat. All right, let's grab one of these other ones. For some reason, I'm nervous about doing anything to this VIP one because I think my daughter wants to save that. I'm also curious why it's so much bigger. Did they put a big battery in there? It looks double A or triple A battery size. So I wonder if these are meant to last for a festival for like three or four days without turning them off. I needed a delay on line 76. Thank you. Thank you, Johnny Bergdahl for noticing that. And here, let's get these flush. Put this one on here. This one, I actually saved the real, that's the real little poll tag for the battery there. I put that in my pocket and managed to not just run it through the laundry, but remember. So that's the little poll tag, which they instruct you to yank out when the concert starts. All right, so there we go. Dun, dun, dun, dun, dun, dun, dun, dun, dun, dun, dun. We get a nice little, put this one under here. Turn that away enough to, no, oh, yeah, that's far enough. IR is insidious. It bounces off of everything, which is kind of cool. It's even blinking here, so it's something, my face or something, as my glasses is working to bounce that off. But if I cover the top and point it, no, I can't fool the LED. There we go. OK, yeah, so my wrist, that, let's see, are those blinking in sync? It looked like they were out of sync there for a moment. And that could be the two cameras. Yeah, in the real world, I think that camera has a little delay if you see these. And no, I think they were a little out of sync. Is that possible? Maybe it's possible. Was the bottom of the bench blinking? I don't think so. It's not on. All right, I think that's going to do it. So let's see, other questions. Love it was a simple language that could be interpreted and written, basic delays, colors, and randoms in IR delays. I wonder what the code looks like on the ship. Yeah, that's a good question. So one of my hopes is to see if I can get this working in Circuit Python. I have, I did a project that was an IR blaster TVB gone. Lamor wrote code for both Arduino and then for Circuit Python. It's actually really instructive. If you look at Learn Guide here, TVB gone, Circuit Playground Express TVZapper called it. This is great because if you're interested in how she built the database of the TV codes and parsed the data, it's all there and then created this big table of TV codes that would work. Yeah, very blinky workshop today. It's true. So I'm curious if I'll be able to use these codes with that in Circuit Python. That would be kind of nice. Other stuff, here is a really nice, if you look this up on YouTube, how concert LED wristbands work from the Wall Street Journal. I'll turn off the sound, but you can see here some nice examples of these effects sweeping around. Looks like a spotlight for a reason. Looks like a colored spotlight. And there's the handheld head spotlight that's sending those messages out. And they have other, here's a CG representation of it in some lighting design software. So there you can see the kind of all or nothing. This is, they interviewed Pixmob for this article. The last concert of this tour was yesterday, at least in LA. I think they've announced some Toronto. I think Toronto is going to be where they're playing. Maybe the only place they're playing Canada. And then some overseas in Miami, I think. So I'm not flying to Miami or Toronto to see Taylor Swift. Anyway, that's a pretty cool article there about that. This is the Pixmob website, if you want to go check them out. They also have some cool demos and talk about their different technologies. I think that'll do it. Yeah. So what else can I say? If you want to go get some parts to do this sort of thing, you can head over to LED, oh, let me go to our shop. You can head over to LED emitter, high power, infrared LED emitter, stem of JSTPH2 millimeter. That's the board I'm using. You can also just buy LEDs. And you might want a transistor to power that so that it gets the full juice needed. But you can grab that and a hazzah and just run this code. You'll need one of these. I'm guessing people probably sell these online cheap after concerts and festivals and stuff too. Who knows? Or go to a concert and keep yours. But either way, if you want to get some of that gear and take 10% off of it on the way out, then use that code. Swiftie. You don't even have to be a Swiftie. But I encourage it. That'll get you 10% off in the store. So type in Swiftie on the way out. And I think that's going to do it. Tyath asks, does the badge, does the land you do similar? What I'm going to do is I'm going to unplug my emitter so that I can show you what the VIP badge is doing. So VIP badge went home with a rainbow, right? So VIPs feel special. The regular wristband went home like that, pulse blue or turquoise. VIP badge, which looks like it has just one LED right in the middle there on Taylor's shoulder. It does a little color loop, which is kind of neat. But you've also paid 10 times as much for your ticket. So you deserve a color or two extra, right? So I have not sent codes to this yet because I may get in trouble with family members of mine for doing so. We'll see. Maybe I'll try to score one of these not from this show maybe. It's probably expensive on eBay at this point, like most Taylor Swift stuff is. But yeah, so that's what that goes home with. But if I put the blocker on the battery, it's no longer running. And now I can fire this back up. And that's my custom thing. Yeah. All right. Thanks, everyone, for playing. It was a lot of fun. I appreciate you coming by. And thank you, Bo Clark. Said nice work. Thank you. Really, I'm just channeling all this great work that was done and shared. I put links in the Discord there if you're interested in checking those out, particularly this one, Daniel Weidman. PixMob IR reverse engineering amazing effort on doing that. You can see here he's got a demo of a whole bunch of these. I think we might have some of these from the reputation tour actually still in our house somewhere. We'll see. I don't think the 1989 show had these yet. Maybe it did. All right. Thanks, everyone, for it for your industries. I'm John Park. This has been John Park's workshop. You can tune in tomorrow for a deep dive with Scott. Saturday, check out Foamy Guy's channel. I believe he's doing a live stream. Come on by next Friday for most of our shows, because it's going to be Circuit Python Day next Friday. So I'm going to do my show on next Friday instead of Thursday, special edition. I think same with 3D Hangouts, Ask an Engineer. There are some panel talks. So check the blog for info on all the stuff we have going on next Friday, Circuit Python Day. It's going to be a whole lot of fun. So come by and check that out and check our blog for details. All right, thanks, everyone. See you next time.