 got super into the groove there. So I hope you do too. And up and by, thanks for joining us here. I don't know how big the planet is. Maybe it's morning somewhere. Probably. For stopping into our YouTube chat. Hey, Dave Odessa, nice to see you. And over in our Discord, if you are looking for the chat, if you're over on something like Twitch or Facebook and you don't see anyone, but you see me talking to people, who are they? They are these people right here. We've got Todd Bot, Jim Hendrickson, C Grover, all the things Andy Callaway. Thin Man, I hope I'm not missing them. Paul Cutler, thank you for stopping by and joining in the chat. If you are looking for the chat, just head to adafrew.it. That's our URL shortener, by the way. Adafrew.it slash Discord. And that'll give you an instant invite to our Discord server, the Adafruit Discord server. And then you'll want to look for that live broadcast chat channel. You can see it sort of peeking out of the side right there. We got a bunch of different channels. Help with CircuitPython, help with Arduino, help with audio, help with make code. We have the CircuitPython dev chat happening there. Machine learning, all kinds of things. But if you want to join in on chat during a live stream, then look for the live broadcast chat channel. Hello, is this Discord? Welcome. It is. You knew that. And Yanisku7, hello. Thanks for stopping by. Hey, Mando5. Hey, Biautograph of Dalhagen. Biaut of the Badmink, yo. Well, let's see, what do we have going on here today? Hey, Starman, hey, Evil Dave of Canada. Let's see, yes, we'll be talking about some Lego stuff. You can see some Lego-y things over there. I'm a workbench. I've got a coupon code for you so that you can go and buy some stuff in the Adafruit store today and get yourself 10% off. If you're looking for a nice little discount, then this is gonna help you out. I will be doing a one-minute recap of a product pick of the week. And I've got a CircuitPython parsec for you. And then I have this Lego color sensor. So as you probably can tell, I've got a few projects at their beginning stages right now. And this one is the next one. So this is, I'll be kind of leapfrogging these with each other a little bit as I work on them all. But this one is gonna be a color sensor that's using Lego bricks as the input devices. And you can see here in our Discord, we got a nice gift from Yaniscu7 of a Gameboy, it looks like a Gameboy color that is also a transformer. Yeah, and I wanna talk about Lego colors with you. I love Legos. Lego, sorry, I love Lego, Lego bricks and tiles and plates and all those things. We're gonna talk about some stuff to do with the colors. What else? That's the main stuff we're gonna do today. So let me start it off with this coupon code. Hey, bricks! Bricks is gonna get you 10% off in the store today. So head to the store, go look for some cool stuff. Store looks like this. Just go to aidfruit.com, that's the store right there. Let me move that thing out of the way a little bit. Hold on, come here, come here thing. Yeah, we'll push that over to the side there. So here's the store, if you head on over aidfruit.com, you can look at some little sections that are promoted here like the new product section. We've got this Qualia ESP32S3 driver for those cool little RGB displays, this RGB666 displays. We've also got, if you click on the little hamburger menu there, you can go to the new products, that'll take you to all the latest new products there. Go find some cool stuff you wanna get. Also, if you wanna get a bunch of stuff and get some freebies, you can see the deals that we have going right now at aidfruit.com slash free. And here they are, if you spend $99 or more, you're gonna get a PCB coaster with the gold aidfruit logo on that. And that is an aluminum coaster, comes with some little rubber bumper feet that you stick on, and then it has the solder mask and gold top. We've got for $149 or more, the free KB2040 board. That's that excellent little keyboard, we call it, but it's an RP2040 based board that is roughly pro micro size. I don't think it's an exact pro micro drop-in or anything like that, but it's roughly that size. And it is fantastic for keyboard projects, just like pro micro is great for QMK. This is a great one for Circuit Python, which is a KMK. Can't remember now, but pretty cool keyboard board, macro board, midi input board, do all kinds of stuff with that. You'll get one free for $149 or more, and you'll get the $99 or more coaster as well, these stack. So if you jump up to the $199 level, you'll get free UPS ground shipping and the KB2040 and the coaster, and then if you spend $299 or more, you're gonna get a Metro M7, which is the hottest, fastest, biggest, baddest board. You'll get the free ground shipping in the continental United States only, by the way, with UPS, KB2040 and the coaster. So those all stack, but if you're just looking to go get some stuff, find yourself some cool stuff and get that discount with that coupon code right there, BRICS, that helps us pay the bills and hopefully the discount helps you out a little bit with stretching your dollars, and we appreciate so much that you come and hang out, and some of you sometimes also buy some stuff to build your own projects, that is fantastic, that's what keeps us rolling here at Adafruit. Let's see, what else is up? Let me move some things out of the way here. Wow, someone just posted in the Discord a, this is James May's Lego house, ah, amazing, I need to go watch, I know that exists, that must be a lengthy video about the building of that, right, I cannot even fathom how much that costs to make out of Lego. Let's see, the next thing we've got, let me mention the show that happens on Tuesdays, that's this thing right here, Product Pick of the Week, pick a new product or an oldie but goodie from our archives and give you a little bit of a demo and give you a big, big discount, usually it's a 50% off discount and you can get up to 10 of them, no coupon code required, so on Tuesdays during the show, which is at four o'clock Eastern time, 4 p.m. Eastern time, U.S. Eastern time, one o'clock Pacific time, where I am here in LA, and here's a little recap. It is the three-axis magnetometer LIS-3MD-L, it is a STEMI QT board, so you can plug and play over I squared C and use it like a compass, this one is tuned particularly well for detecting the Earth's magnetic field. And what this is gonna do is print out the compass heading, so when I get to about zero, or 360, 359, one, that range of things, zero, that is north, and you can see we can point this around, pivot this around, get about 180, there's south, there's west, find east over here, that's my product pick of the week this week, it is the LIS-3MD-L, three-axis magnetometer breakout with STEMI QT. Yeah, and you may have noticed, if you were watching, I kept calling it the LIS-3D-MD-L, I think, and I just can't help when I say a three, and there's a D nearby to call it 3D, so through the magic of editing for that little one-minute recap, I did not make that mistake, but I made it a whole bunch during the show, I can assure you, I have to live with that when I edit it. Vid Kerricks over in the YouTube chat, hello. Said they saw that Lego episode a few years ago, very cool, yeah, I wanna check that out. Also, they got a coaster and they're nice, excellent. I don't have one in here, I'm actually using, I really love this one, I still have this Adabot one, I think we were doing clearance on these, I don't know if we still have any of these in the shop, they were a bold port collaboration. In fact, let's find out, what do we have coaster-wise? Are there still, are there still those? Coaster, PCB coaster, PCB coaster, wait, they should be in there even if they're gone PCB coaster? No, how, why? Oh, maybe this is, out of stock is not filtered in stock, coaster, I'm determined here to find some coasters. All right, where'd you go? Why don't they show up? Oh, let's go bold port, oh, we're, coaster, bold port. No, bold port, why are they gone? Why are they erased from history? I wonder if it's still filtering too. Yep, out of stock, in stock. Oh, can I include discontinued, that's what I need. Oh, there they were, did you see them? There, sorry, all right, I shouldn't be waving those around, they're gone, gone forever. But yeah, the, the freebie coaster, that still exists. Go get that, forget I said anything. All right, let's, let's move on then. Next, let me get, let me get set up here for, this is gonna be our final Circuit Playground episode of the Circuit Python Parsec. So we've been doing these, I might try to put them up in their own little playlist for people who are looking for that, the series of all the different onboard goodies that you can access on the Circuit Playground Express and the Circuit Playground Blue Fruit. Today's actually is sort of an exclusive because it is the only one I think that I've shown here that is only for the Circuit Playground Blue Fruit. So with that teaser, please join me in checking out the Circuit Python Parsec. All right, let me get all set up here. In fact, this is a demo that kind of runs itself for the Circuit Python Parsec today. I wanted to show you how to use the sound sensor inside of Circuit Playground on the Circuit Playground Blue Fruit. So as you can see here, I have some code running. I've got my Circuit Playground Blue Fruit. And if I snap my fingers, watch that graph. It's going to register each time I make a sound and the level of that, depending on how hard I clap. Sorry, I don't want to blow your ears out. You will see that level change on the graph. So how does this work? What I do is import the, from the Adafruit Circuit Playground, I import CP. That library takes care of all of the low level stuff, makes it really easy to use. In my main loop, all I'm doing is printing, the sound level is equal to, or sound level, and then this, CP dot under, sorry, CP dot sound underscore level, that's it. All you have to do is ask for, hey, what is CP dot sound level? And that will give you a number. You can see them scrolling by on the side here. Let me, let me see, will this let me adjust that? It won't. So you can see the numbers, if I'm kind of quiet. I've got air conditioning in here, so those are only getting down to about 50, 60. But then when I clap, we see that thing spike way up close to 2,000. So you can not only use that to graph the sound, but you can use it as a trigger for things. So what I'm gonna do is go ahead and comment that code. Hey, why is it not commenting? Oh, I'm not, sorry, I'm in the wrong, in the wrong window, there we go. Comment that code out and uncomment, this little example here. And I'll re-save that. So what this one does is it uses a little extra bit called loud sound. So CP dot loud sound, you can see it there. If I'm quiet and then I say something, it is registering that sound. So I'll be real quiet. And anytime you wanna use something like a snap or a clap, you can trigger an effect. So let's bring this threshold up. Okay, so now I have to get a little bit closer and a little bit louder before it triggers. So the way this works is I say, again, from Adafruit Circuit Playground import CP, then if CP dot loud sound, that's either false or true, when it goes above a threshold, which there's a default built into there, I can't remember what it is, but if you wanna specify it yourself, you can say sound threshold equals and then a number. And then in this case, I'm using Circuit Playgrounds pixels to fire off those near pixels by saying CP dot pixels dot fill and give it a color value. And then I wait a little moment so that we get like a half a second before it drops right back off. And so that is how you can use the sound detection inside of Circuit Python's Circuit Playground library on the Circuit Playground Bluefruit with the onboard microphone. And that is your Circuit Python Parsec. Yes, Circuit Python. Hey, yeah, there we are. Oh, I left that mic on anyway. All right, I'm gonna turn this off because it is now gonna blink every time I make any noise. So yeah, thanks for sticking with me on those Circuit Playground library videos. I hope you enjoyed those. And let me know if you have any suggestions for either individual Circuit Playground tips and tricks or any series types of ideas you might have in mind. I'll also be coming through some of my past notes and putting together some, but it was kind of nice to be able to do that as a series and put together all of these examples from the Circuit Playground library. All right, let's see, what is next? Okay, so what I wanted to do is talk about, let me talk about this project here. So I'm gonna introduce a little bit what the kind of goal of the project is and then we'll back up a few steps to where I'm starting out and the process I'm going through for prototyping. So, Lamor told me that there was a project that Jay Silver, who you may know Jay, super awesome guy, you may know Jay from Makey Makey, which is a little touch sensor and microcontroller all in one board that's used particularly for education. Super cool product. I think they probably got most famous for banana, maybe a banana piano or just a single banana touch sensor. But yeah, Jay had at the MIT Media Lab done a project that was a music glove which when you hovered over different Lego bricks in different colors, it would play different notes on a synthesizer of some kind using MIDI. I've never seen it, I'm just hearing about this as like third hand information here. So if anyone finds any info about it, I should maybe contact Jay and see if he's got any videos up, it would be fun to look at. But Lamor said, hey, that was many, many years ago and it has become so much easier to do this kind of project now. Why don't you look into what it would take to build something like this today with the types of plug and play parts we have and something that's really easy to code like circuit Python. So that's the goal. And the sort of second layer on it is that rather than sending MIDI commands out to some other device, let's try to make it all in one. So since we have, since we have Synth.io, we can do kind of everything on one board, on one microcontroller dev board, which is the interpreting color sensing information as well as playing musical notes or adjusting different parameters of synthesized sound with a small speaker and an amplifier kind of built all into one. So the idea is to make it into a glove or similar type of interface that you can interact with colored objects. I'm gonna use LEGO bricks just because it's easy to work with and a lot of fun. So what I decided to do was first of all, I have a little, not a lot, but a little bit of experience in the past of using color sensors. And I know that some colors can be easier than others to distinguish among. And what I'll probably go for is maybe anywhere from six to 12 bricks. I don't know if I'm gonna try to do a chromatic keyboard type of thing or not, but a handful of bricks and find the best possible colors so that it's easy for the color sensor to distinguish among them. So what I did was I looked this up online and I checked to see what LEGO elements are made in the most colors. And it turns out it's these right here. The humble one by two, grab one for you. So that right there, there's a lot of light coming from right there. The very humble one by two brick has been produced in the most colors over the years. And there are something like 40 or so in current production. And then you can find other colors that have gone out of production that are still available if you want. So what I did was I went into a LEGO CAD program and built a scene with every single color that's available in the LEGO CAD program. And this is called Studio, Brick Link Studio, which is free to download. In fact, I'll show a link to that because that's my kind of tool pick of the week. So what I did was I just dropped in, I think it's 53 or something like that blocks and then set them each to a valid color. Now the program lets you pick any color from the rainbow or any color from the LEGO catalog and assign it to a brick, but it'll tell you, by the way, you can't actually buy that brick. It doesn't exist, it's never been made in that color. So with this one, we're pretty safe because this is the brick that's been made in the most colors. So then what I did was I actually went and exported this scene or close to this scene. What I did was I actually, I think I wanted to make sure I got like eight each of every color so that I could build up a nice little swatch. So I just duplicated that row eight times, saved it, and then uploaded it right to Brick Link, which is a sort of third-party LEGO sales site where you can buy individual bricks for building stuff and you can export this bill of materials into the Brick Link's interface and then say, hey, find me the minimum number of stores where I can buy for the least amount of money and the least combined shipping, the stuff in my build. So you'll find this a lot if you build other people's creations or if you model big, complicated things and you wanna actually put it together, you gotta come up with a list of stores that sell it all. So I actually found three, it took three stores to get every color. One store had almost all of them, like 89% of them, another store had four colors, another store had three colors, something like that. So I was able to get them on order. One order came in of just four of the obscure colors, but I'm waiting on the bulk of them. And then what I'll do is I'm gonna characterize these with the color sensor and find my ideal combination of bricks that are the most different from each other and the easiest for the color sensor to detect. So that's my goal. And let me see, what other pictures do I have here? So yeah, so then what I did was I went to the LEGO store, there's a local LEGO store, and browsed around their pick-a-brick and happened to find a nice combination of bricks that I could build a platform for these for my testing. So that right there is two up of each of these one by two bricks. And you can see I was able to use some little angled like roof long, I think one by eights of these sloped bricks for the front and the back of the thing. This is what it looks like in real life here. I don't have the flat tiles that you'll see on there, but that's the thing I built just based on finding some good stuff in the pick-a-brick wall at a LEGO store. And what I can do now is once I get all the bricks in, put this together, put all the color bricks on there and then use a little rig to check each color. Now in real use, my hope is to be able to use a glove so it's gonna vary. I'll have to have kind of a fuzzy range there that is allowed as far as the color values go, which is why I wanna find like the six to 12 bricks that are the most different from each other and easiest for the color checker to find, the color sensor to find. So that's what I've put together. Here's just a beauty shot of it because I thought it looked cool up close. Look at all those colors. I actually, I don't think I have a good image of it here, but I put together, if you see in the upper right corner that image there, I put together some groups of like the blue to purple and then all the greens and all the yellows and all the reds. Blue wins, there's a lot of blues and I knew this because I had recently put together that Van Gogh, Starry, Starry Night, art, Lego art piece that they sell and I was amazed, there were like seven different shades of blue in there that were really useful for creating that painting. Let's see, what did, oh, is this not updating when I'm changing it out? Sorry, okay, let me, that, yep, sorry, that's the, I showed you the real one, but that's the design I put together for my little brick holder. Thank you, C Grover, by the way, for pointing that out that that didn't update. So that's what I'm gonna, that's all the colors that I'm getting and then I think I'm gonna ignore the transparent. I think it might fill that whole thing out, there's about six or seven of these sort of translucent colors. We'll see, I'm gonna test them with a different color sensor and see, but I'm guessing the solid ones are the better bet. Who knows? So, yeah, sorry, so that was that. Here's the close up of that, there we go. Look at all those gorgeous colors. The rarest one, which I just got, that was the order I got, is called Mersk Blue and it's because Lego made a set of Mersk shipping container and truck and airplane at one point, probably as a promotion, cross promotion with Mersk, which is also a Danish company and that's the only time they've used that color so you just can't find that many of them. I don't know if that, I doubt that ever came out in the US so that's a hard one to find. That was the rarest color I think that I needed and what else did I, here's just a little close up of some of those bricks. By the way, there's a couple of gorgeous rendering options inside of the studio program. In fact, let me show you the program I'm talking about right here is that right there. So if you just look for BrickLink Studio, there's actually a fascinating history about Lego CAD. There was, I think really the first one that I ever encountered and may have been the first one was a program called Eldraw, which was a, I believe, open source effort. Eldraw has basically evolved over the years into I think one of the in-house tools at Lego. This, which was a Lego in-house tool and then got spun off, I think most of that lineage comes from Eldraw and then Pavre and other renderers have been added into it, but really cool program worth checking out. I may show some of that on the show here sometime if people are interested just because I think it's so much fun but it makes it easy to build with an infinite pallet of bricks and then actually get your stuff built, which is cool. So that's Studio. I don't have it installed on this computer so I can't show it right now. All right, so that's part one of it and there you can see the thing in action. So what you'll also notice there is I have at the top there, you'll recognize a sensor and actually you'll notice the telltale hang tag. That was one of the early sensors that I showed on my product pick of the week and here's a different one and I had these bolted to these little 3D printed hang tags. So these are color sensors. This is one that I have started doing some experimentation with. This one is the AS7341. It's a very nice color sensor. It's got a built in white LED to give you, I noticed my camera here has a lot of warm colors. Color balance, that's not true. There we go, that's a little better. So nice color sensor does believe nine channels of the different like four, 15 nanometer, 525 nanometer and so on. So it has all these wavelengths that it'll spit back but unfortunately it's a, at least so far in my use of it, it seems like the chip itself has a fairly slow integration so it takes about a third of a second for it to update, which may or may not be usable for this project. I don't think anyone's gonna play Flight of the Bumblebee with it but to use a musical instrument input that has almost a half second delay might be frustrating, we'll see. So I do, I may show a demo with this. That's the one I showed last night on show and tell. And so this just looks at the Lego bricks with this little light to help illuminate things and spits back values over cinema QT, I squared C. So that's one and then Lamar suggested since I was finding that one to be a little slow for my needs, that I check out this one right here, which is the APDS9960. Interestingly, this one is a bunch of stuff. It's a gesture sensor, so it's got four elements that can tell IR elements, that can tell the direction you're moving left to right or up and down. And I think if I remember correctly, it purports to do other stuff, but those are the easiest is like left to right or right to left, bottom to top, top to bottom. So it can detect those. It's a proximity sensor, which is kind of interesting for this project because if I wanna do something like change a synthesizer parameter based on height from the surface of the Legos, that could be useful. I'm also in my test rig here, just using it to not bother giving me color reads when the proximity sensor is beyond a certain threshold so that I have gaps between my bricks and it just doesn't bother readings. So that kind of speeds up the things a little. It's not constantly looking for colors. And then it's got a color sensor in it now. Unfortunately, this one does not have a onboard LED. So I'm gonna look into some options for if I use this one in a guide, what are the best options for using an LED to light this up that's easy for people to put together. I was thinking about this implementation of the same sensor as well, which is a Trinkie. So this is a all-in-one, what is this, a RP2040? No, it's an AtSAMD21. Yeah, so these are our little plug-in to the USB port. It's an AtSAMD21. So M-Zero chip has a couple of neopixels on it. So maybe light those up white to do some illumination of the bricks, but not as probably reliable as a pure white LED versus a mixture of RGB, we'll see. Other problem is that I want this to be all-in-one. Synthesizer is not really gonna run Synth.io on an M-Zero and no amplifier on it. So probably the ideal board for this is gonna be that right there, the new RP2040 prop maker feather, which has I2S audio amp on it. It can run Synth.io for days, no problem. Plug-in over STEMAQT, the board's the only issue there if this is the right sensor is the illumination. So what I did, let me show this up close. What I did this morning just to test the theory is I didn't want to rely on a flashlight or an external fixed light source or putting an LED in front of every one of those bricks. So I took a surface mount LED and I'm gonna get a little closer and focus this a little better. So you can see this, there you go. So you can see I have a surface mount LED that I scavenged from another part. I soldered two little bodge wires on it and I used them as kind of a mounting bracket for the board and then I have elegantly, very elegantly about 1.7K resistor there and I'm just running this off of the 3.3 volts STEMAQT power that's coming in over that STEMAQT cable that's available right there on 3V and there's a ground there. So when I plug this in, it just powers it on. I can't control it, I can't set brightness levels. I'm not PWM-ing it, which might be good because PWM-ing does involve some amount of flicker which might need to be accounted for. You can see I have a very illegal building technique here which has already led to a crack. So sorry for that, that's a horrifying offense against Lego building, but I just needed to get some stuff tested. And so this rig is kind of a little sled that I can move, grab a brick here at a consistent height over the different bricks for now just to characterize them and get their color values. So that's what I've put together now and that just makes life a lot easier than dealing with the variables of me moving the thing around and being at different heights. So for now, this is I think a good way to start and then I'll need to make it a little more permissive of the way I wanna actually use it. So that, let me go show you the build a little bit. Here for a second. And then we can, whoops, we can see what it does. There we go, jump over here. So what I've got is, whoops, just break it. What I've got is a, just to make it easier for me to see what I'm doing, I put the same color brick on the backside there just because I'm from my point of view, I don't see the brick when I'm testing its color, getting its values. So I have this feather prop maker and I just need to plug my STEMIQT cable in the right way and not the wrong way and bend everything. There we go. So that's the prop maker feather there and I'm running, it has its own I2S amplifier which is powering this little speaker that I have clamped here and on the Legos. Lego bricks, sorry. And then my little sled here, I actually put some, not quite stops but it allows me to just with my finger get to the exact position repeatably again just so that it's easier to be a little more scientific and repeatable about it right now while I'm testing things out. So this is an array of bricks that I found so far are pretty good as far as they're being able to distinguish among them versus each other. Interestingly, and some of this was done with that other color sensor that I showed you at first, the lime green really stands out as green more than green green, which is interesting. This has some blue in it as far as that sensor goes but this kind of lime green here really is clearly different from other bricks. Same with the pink which I believe has more red and indigo in it than one of these actual red bricks and part of that I think is just the lightness of the brick. They seem to be saturated enough to stand out but being a little lighter helps as well. And same with this, this light blue works better than sort of your traditional crayon blue, darker blue, that kind of blue brick. So that's how I'm testing this and then eventually I'll probably come up with a different form factor for using the glove on. So let's take a look at some values here and some numbers and then I may also throw the other sensor on there and show you the demo that I did last night with that actually triggering notes inside of the synth IO. So let me zoom out a bit here and self in the corner there, hello. Ooh, look, I have a, I forgot, I have a nice little soft edged oval mask there. So let's bring up actually that view, sorry, we'll take that away and what I'm gonna do is open, oh gosh, am I gonna break it? Let's do this, let's do a new, okay, don't save. All right, so I'll plug this in, I forget, Sublime Text kind of closes the window down that you're seeing so I can't close that document there, I have to make a new blank one. All right, so now I'll open up the code pie on this feather. Okay, and I will use Disco Tool here to connect. So you've seen all that, yeah, all right. So first of all, I'll point out the LED there is lit up and I actually have it kind of pointing at an angle and that may be wrong, the typical thing, if you look at the front of a clue, which has the same sensor, is to have, and this is really nice, there's two LEDs, one on either side, is to have it pointing in the same plane as the sensor. So I might be looking at a glare, I don't know, so I'll play around with some of those factors as well, here it is, and it thinks that brick is yellow, it's wrong. So I have a bunch of terrible code in there right now that's sort of half works, which I'll be working to fix and actually see Grover in our chat has some great ideas for some color threshold measurement that could be really useful. So what I'll do, well ignore, yeah, you might see some false, it makes some false statements, but pay attention right now just to, these are the elements this particular sensor spits back, which are red, green, blue, and clear, which is essentially the brightness level, the white light brightness level. And so you can see it, let's go to a brick that I don't think it's gonna say a color name, there we go. So you can see it's spitting back 2500 for red, 2100 for green, 2500 for blue, clear is at 6400. There is a bit of code that I pulled from the examples for this library called Calculate Color Temperature, which you can see there. That takes three, the RGB components in and it outputs a single number, a kind of combined number, which is unique. So that may be a nicer way to deal with these rather than mixing and matching among the elements. So this says that the number 22,700 is what pink shows up. If I move over to this lime green, 4,716. So quite a difference, which is great. And that's what I'm looking for here. Orange and yellow are pretty similar in this context or with these particular bricks. So I may go to like a pale yellow, that might be helpful once I get all my colors in. So this one is 2,300 for orange, yellow is showing up as 2,600. Also, this is different ambient light in here than in the place where I originally looked at these numbers and set up my code. So a factor I think to this is gonna be a calibration process. So it might be useful to have maybe a little screen on the back of the glove. And then you can say, okay, it's time to calibrate. It says, okay, hover over pink, hover over lime green, hover over yellow, hover over orange, which will be really helpful for accounting for the different ambient light that you're gonna encounter. Here is this green one. This one shows up as quite a different number. Again, here's light blue. It's number 17,000, right? So a very, very different number. So that at least is a good sign that I'll be able to characterize enough colors to do something interesting that it can detect. Let's see the other things to show just how this works in general. We bring in this APDS9960 library, set it up as a sensor, sensory equals eight of fruit and so on and so forth over I squared C. I'm enabling proximity sensor. So you'll see if you look down in my, that has stopped updating. And that's because I'm hovering over a gap between the bricks and there's a height difference between those. So you can see my finger here, right? This is a little valley here. So while I'm in those valleys, I don't bother asking for the color sensing, which is kind of cool. And now, boom, it starts again, it stops. In the demo I showed yesterday, I used a similar thing, I didn't have a proximity sensor on this so I just used brightness, which works as well because the brightness drops a lot when we get to one of those little valleys. And then you can see I'm enabling the color sensor. So you can pick and choose which sensors you wanna run on this little board, which is nice. Oh, left digits didn't show, it's cut off. Sorry about that. Let's see, can I, there we go. Okay, so here you'll see it's updating, it's updating, and then I'll go to the valley there and it drops off. Thank you, Franklin, for the note. I didn't realize that that wasn't displaying this. See that better now? Yeah, so those float values you see, like here, 19,000, 18,000, that's sort of concatenated color temperature value. Now it's showing nothing, now over the lime green one, it's the 4700, nothing, orange is the 2200, and so on. So once these are enabled here, we can then set up, this is some of my hacky code right now for setting up some little lists of color values and their names, and I'm writing those combined float values into this index, color index list here. And then in the main loop here you can see, I check this proximity sensor, if it is less than, we're equal to 30, then we just don't do anything. And then when we get over the top of something, that's when we, over the top of one of these colored bricks, that's when we can start grabbing the color data. So I'm writing RGBC, red, green, blue, clear variables based on sensor.color underscore data, that's how you just ask for, okay, give me all your info. I'm printing it here just as an aid to figuring out what color values are good, but I can probably stop doing that if I'm able to work with this sort of concatenated color value based on that function right there. Calculate color temperature, and that is in a file that is next to the library file in GitHub. So if I end up using that, I'll point that out in the learn guide. And then in the main loop after getting that color value based on concatenating them, I was then playing around with some ideas that C Grover had about remapping those to integers with some sort of slop value allowed there. So that's kind of why this orange and yellow thing doesn't quite work because my code is a mess right now, and because I think the ambient color temperature changed, or ambient color value changed in this space here. Let's see. Beotograph says definitely we'll want an actual white LED and check the color temperatures. Yeah, that's a good call there. Oh, now it thinks this is yellow as well. It thinks everything's yellow. So the other thing I wanted to do is just so we can get a little preview of how this might work as a MIDI interface, or rather a synthesizer interface, is I'm going to power this off first, and I'm gonna remove that Stem-A-Q-T cable from this one. We'll see if I can freehand this one without swapping out what's in the little Lego sled there. This is the, what's your name, AS7341, and I'll go ahead and plug this one in. I can power that on. It's gonna get mad because it's not gonna find that sensor, but that's okay. I'm gonna grab, let's see if this is the code I want. No, this is it. Okay, so let me open that, and I'll resave that as code.py, and this should restart. Okay, it's happy again. So you can see this one has this nice, bright white LED on here. Okay, so that's the idea, and you can see it's just a little slow to update. There may be some ways to get around that. I tried increasing the frequency of the I2C. I think Todd or C Grover made a comment that flew by about possibly adjusting an I2C timeout that could help, but this one does a pretty nice job. The code I have right now, I kind of simplified what it's printing so you don't see a lot, just when a color gets identified. The kind of nice thing with this one is that it spits out this, let me print it up here so you can see, let me save this. When this sees a color, it spits out this big list of like eight or seven different wavelengths, the values within them. So it could be interesting to feed that through a concatenator for unique values as well, I don't know. All right, so that's the general idea. Hope you enjoyed seeing that, a little sort of preview of the prototyping phase of putting this together. I think it's pretty cool that you can put together a prototype of something like this as simply as plugging in and there's basically no soldering in the case of this one other than me hacking on an LED and a resistor for this one, but a pretty cool minimal amount of assembly to get a neat color sensor working, get some code sort of working and start to be able to do some color sensing of different objects. Let's see, I think that'll about do it. Biograph says I think one of that one blocks in the read routine. So if you have the read time set higher code it'll be sluggish. Yeah, this one, right, this AS7341. Yeah, you must have experience with these because it does have in the driver library you can't alter it. It does a pretty long read which gives you more accuracy and throws out noise better, but it just takes a long time and I think that's kind of built onto the chip. It might not be something that can be adjusted even in the library or driver. So we'll see. I mean, depending on the style of play it could just have nice long reverb details and not be meant to be something that you can play quickly. Could be, I'm not picky about it really. I think I'll try a couple of our options there. The, and actually I haven't really been done my due diligence and tried it on the clue, which is the same sensor, the APDS9960, does have the LEDs built in for illuminating the bricks, which is great. I don't love that the screen is on the opposite side so I can't use that. I kind of, I wonder if I should pop the screen out and flip it to the other side here so that I can still see it and use it. That might be an interesting way to do this as well. It gives us a little bit of UI with some of the touch sensors and buttons that are built onto there. So maybe we'll see. If you have suggestions, other thoughts, experiences using these, I appreciate it. Just hit me in the chats or in the Discord. So before I go, I will say once again, there is your coupon code for today. If you wanna get 10% off in the store, pick up some cool stuff. Maybe pick up some color sensors and start playing with them and writing software for it. That would be awesome. Use this coupon code, BRICS. It'll get you 10% off today. Head to Adafruit.com. Put stuff in your cart and then as you're checking out, there is a coupon code field. You can type that in and it will automatically pull 10% off the price of all the physical goods you buy. It does not work on gift certificates or software or subscriptions, but it's good on real stuff. So buy some real stuff. Why don't you? All right. I think that's gonna do it for today. Thanks so much for stopping by, checking out my little fun I'm having here playing with Lego BRICS. I will keep you updated. I'll let you know which are the ideal colors. I think I will also put together just for fun, a little display of every color. Put it on the wall or something like that because I think that's fun. For Adafruit Industries, I'm John Park. This has been John Park's workshop. Don't forget, we have a whole bunch of other live streams. You might wanna tune in tomorrow for a deep dive with Scott, a foamy guy deep dive on Saturday. I'll be back with a product pick of the week on Tuesday. We have 3D Hangouts on Wednesday. We have Show and Tell on Wednesday. We have Ask an Engineer on Wednesday. I hope I'm not forgetting any, but those are the ones that came to mind. You can also go into our live broadcast Announce channel on Discord and check out any happenings there or type in question mark show times. And we have a little bot who will tell you all the possible show times. In general, those are not updated on a weekly basis. Those are just the general show times that we have. All right, thanks everyone for stopping by. I will see you next time. Bye-bye. I'm gonna go play with Lego bricks now. Goodbye.