 Welcome to the show, it's me, John Park, and this is J.P.'s product pick of the week. Thanks for coming by. My song ended faster than I thought, I was still setting stuff up, but here we are. So thank you all for stopping by, and when I say you all, of course I'm mentioning the good people over on our Discord channel, as well as in YouTube and Facebook and Periscope and Twitter and Twitch and who knows where else people are watching the show. So thanks for stopping by. Let's see, before we get into the meat of the show, what I'm going to do is I'm going to roll up my sleeves here, this is serious business, and I'm going to send you over to the product page for our product pick of the week. You can watch the show within there, and you can get yourself a great discount. This is the product page, it's item number 1980. It's adafru.it-1980, that'll get you there, or use this URL here, or this QR code, point a camera at that, and that should take you right there, and it's going to be a 50% off discount. In fact, I'm going to go and reload the page myself and check it. Sure enough, 50% off, that is wild. It actually doesn't show the red 50% off thing, something has changed on the site, but if you go and look right there, that's half the price it was just a moment ago, I promise you. And look, you can watch this video right inside of here, so why don't you do that? All right, so I've given too much away already, have an eye. Let's go ahead and have, before I jump into it, let's go ahead and have Lady Aida tell us about the product, so take it away, Lady Aida. This is GSL2591, we've carried the GSL2561, which is one of our most popular sensors, the Lux Sensor. This is the GSL2591, which is like 500 times more sensitive. It's a little sensors in the middle, and it's 600 million to one dynamic range. It's incredibly sensitive, and you can set the gain, multiple different gain settings over I squared C, you can set the integration time, it basically is a very sensitive, very powerful light sensor, and we have some Lux calculations as well for it, so you can use it to calculate Lux if you want to make your own Lux meter. Most of the people are saying like, I want something that's more sensitive, incredibly bright light, so it can go up to 88,000 Lux, which is like bright sunlight, all the way down to 188 micro Lux, so that's like a really, really wide range, it's almost as wide as like your eyes, so it's very good for anything where you want to do wide sensitivity light sensing, and it has both IR and full spectrum LED, so then you can take out the IR to get visible, so you can do visible on IR basically. Okay, next up. Next up, never stop stemming, that's what you tell me every morning, and I have not stopped since. So this is another stemification, the TSL2591 is a long standing Lux light sensor that we've had in the shop for quite a while, as product number 1980, a good year for breakouts. Now available in STEMI QT format, plug and play, it's the same price, you get the same sensor, same schematic, still 5V or 3V, usable, I squared C is level shifted as well, and it's plug and play, so you can use it with anything that has a STEMI or STEMI QT or quick connector, we also have adapters so you can use these with Grove devices as well. All right, so give me a second, I'm going to go and grab my own right from the wonderful cabinet of mysterious wonders, I'll be right back. All right, yes, so that's our product pick of the week this week, it's the TSL2591, it is a high dynamic range light sensor, it covers visible spectrum all the way up through IR, and what I'd love to do is show you some demos with it. So I have, the reason I wasn't holding one up is I just have one and I have it plugged into a demo. So if you'll bear with me, I'm going to show you, there's the light sensor itself, and I've got it plugged in over the STEMI QT cable to this Metro ESP32, S2 Express that has the STEMI QT cable built onto it, so that's the only connection we need for data, clock, power and ground, and I have a circuit python sketch running on here, code running on here, I'll show you that in a minute. But what I want to do first is show you this in action. So I'm going to pull open, I have a session of Moo here, and one of the things I like about Moo, it has this integrated plotter, so you can see there's a little serial readout on the side as well as the plotter, and what I'm calculating right now or what I'm showing is the total lux, which is essentially the amount of light in a one meter circle. So this is how bright is a beam in one section, and you can look up the differences between lux and lumens, and how you use those, how you care about those, but this one actually gives us the, does the lux calculation, so we can see just how bright is it in one circle of light. And right now you can see we're at around 200 lux, that's what I am plotting on the plotter there, and you can see as I put my hand over the sensor there, it's going to drop way down, now we're down at 30, about 70, 40, 36 lux, you'll also notice I'm showing the infrared light. One of the reasons I wanted to do that is that you can often have a remote control with a dead battery in it that you want to know is this thing working, why is my TV not responding, sometimes you'll find cameras that will show you the little purplish light, other cameras will have a filter on them so it doesn't work as much as it used to in the old days, but what we can do here is if I look at that infrared value right now, I'm kind of shielding it with my hand so I have an infrared setting of about what, five-ish, and now if I hold down the remote, I'm pressing the power button on the remote, I'm getting around 60, and I'll let go of that, drops way down to three, I will show you, this is actually, you can see the little purple, blinky lights there probably, so this is, this camera here doesn't filter that out, but that's kind of a neat thing to be able to look at the infrared light value, even neater though is this visible light luxe, so you'll see here, if I take a pretty powerful flashlight and point this at the light, I'm going to jump up to around 300, 400 luxe, as I get closer of course, that'll get brighter, if I switch to a brighter mode on the flashlight, it'll blow way up here at this distance to 4000, so you're going to want of course to, if you're measuring something like flashlights or lights you're using for lighting on camera or photography, you'll want consistent distances from the meter, one thing I did here actually is I felt like seeing, okay, what's the difference between this flashlight and let's say the sun, so I've positioned a little hand mirror outside and you can see my hand here kind of blowing out, let me move the camera a little bit, as I raise it up, that's a light beam I have pointing from outside in the hot Southern California sun running right into my workshop, and so I'm going to take the meter and lift that up and put that in the sun, and you can see now we're at around, what, 10,000, 20,000, 30,000 luxe, so pure sunlight, it'll get around 100,000 luxe, but I'm losing some of that through the use of the mirror, it's not a perfect mirror, so we're losing quite a bit there, and so that's kind of a neat demonstration of the power of the sun and being able to measure that luxe is really nice. What I wanted to do now is actually, let's take a look back at the product page here before we take a look at the code, and the code is really straightforward, I promise you, so here's the product page, and you can see there's our TSL 2591 in StemAQT format, half price right now, $3.48, you can pick up up to 10 of them, and this will tell you a little bit about it, let you order it, if we click on the, of course we wouldn't leave you with just a data sheet and good luck, well that links you to the Learn Guide, so here the Learn Guide will tell you how to hook it up, we had two versions of this, you saw that first video, there was a version, I think we maybe still sell it, but it uses the same pins, if you wanted to use header pins at the bottom of this rather than the StemAQT, we'll tell you all about the pinouts, there's the two sensors, as well as if you're going to use the pins on that, you can assemble it on a breadboard, and then wiring and testing, I'll tell you how to wire that up to your microcontroller, and use the Arduino library, that is, if we jump down to this Python and Circuit Python section, again, goes over the wiring and tells you how to wire that up if you're using something like a single board computer and use Blinka, otherwise we're going to use Circuit Python on a microcontroller, and this goes over the usage, there's a library that will grab the Adafruit TSL2591 library, set it up on I squared C, I'll show you that in a moment, and this also talks about the different things you can measure, so there's Lux, there's visible light measure, which is a 32 bit unsigned value with no units, there's infrared, there's the full spectrum, which is the visible and infrared combined, and then there's raw luminosity, which is a two tuple of raw sensor visible and IR and IR only light levels. So the one that I find most useful here is this this Lux. So let's look at a couple things with that. So let's let's take a look at the code. If I jump back to actually, I'm going to jump over to Adam for this. It's just another code editor that I like to use. If you take a look here, you can see, let me make that a little bit bigger for you actually stand by scale that up just a wee bit. There we go. So if you take a look here, you can see at the top, we're bringing in our library as well as the board for pin definitions bus IO so we can use I squared C, establish the I squared C bus, instantiate the sensor, make the sensor object, your sensor is eight of fruit TSL 2591 on I squared C. And then these are important. So here's a set of optional gain and integration time values that you can adjust. So I think by default, this is set to a 25 times gain. So that's presuming that you're measuring some not as bright things, not a big flashlight right up against it, but instead maybe a room light level. And so the input needs to be gained up a bit to be useful. However, when I'm using things like a flashlight right up against it or the sunlight, we want to have a gain of one so that we don't exceed the possible values we can use. So depending on your situation, you have a number of different gain settings that are set up in the library and on the chip. And those are expressed as gain low, medium, high and max. And then we also have different integration times for how long it's going to sample those before it spits out a value. And I'm leaving that at the default, which is I believe 100 milliseconds. And then here is the code, there's actually more comments here than code, just to explain things. So all we're doing in the main loop, I'm setting this into a try and accept just to prevent a value error if we have the gain set incorrectly. However, if you have your game incorrectly set, you'll, we'll want to adjust that. So either way, this will print out and let you know that you should lower your gain is what I what I have here. And this being circuit Python, there's people actively developing it all the time. Perhaps you're one of those people, I went ahead and put in a suggestion and enhancement request to not give a value error, but instead let the user know when when they should adjust their game setting right in the library. So I don't have to put that in code, we'll see how that goes. And then I'm doing really just two things. I'm printing the lux value by just asking for the sensor dot lux, which is this variable right here. That's it, you just ask for sensor deluxe, you get that return to you in lux. And then by putting it into this format here, I'm able to plot that on the move plotter. And then the second thing I'm doing is grabbing the infrared value again, just asking the sensor dot infrared that returns that infrared raw value, I think 16 bit value. And then I'm printing that again, just showing that inside of my serial port. So that's, that's how we get those two things right there. So if I if I close that plotter, we'll see a bigger version of that print out there. So you can look at that, but that becomes a little hard to read. So really, really like this, this plotter right here, that's very useful. So again, if you watch that, that value, we're at ambient temperature, ambient light levels here of around 200. If I still have my sunlight, let's see, where has it gone? It has moved. There it is. I got it. Oh, I have found it. So you'll see the values now jumping up to around. Oh, well, the 64,000 is the top of our range there. If I turn back on that serial plotter, we can see actual numbers were hitting somewhere in the neighborhood of yes, 60,000 or so lux right in the bright sunlight. So you may find this useful for things like if we check out the data sheet, let me jump back over to Chrome. This is something like to do is take a look at the data sheet. What does the manufacturer think we should use this for here? It says some benefits of it approximates the human eye response. So that 600 million to one range that's similar to the human eye sensitivity light, although don't look at the top range stuff and burn your eyeballs out. Don't look at the sun, this can, you shouldn't. They say suited for operation behind dark glass. So, for example, putting this inside of things like cell phones where you want to be able to measure ambient light temperature, but not show the sensor off to the world as it's possible. And then this goes into some of the specifics of the chip. And you can find a lot more operating details, temperatures, mechanical assembly and all that inside of the data sheet. And I think that does it. So let me know over in the chat if you have any thoughts, feelings, hopes and desires for using a light sensor. But this is a really good one. Like Lady Aida said, this is about the best one we could find the one with the greatest level of range, about twice the range of the previous model that we used to carry. So it's a really effective light sensor, a luxe sensor. And I think that's going to do it. So let me unplug this one here and try to assemble that onto a little hang tag. I printed there we go. So let's jump back out here for a moment. Hey, where's that extra me? There I am. So that's our product pick of the week this week. That's my product pick. It's the TSL 2591 HDR high dynamic range light sensor. And I'll set that on my little board there. And that's going to do it for another episode of JP's product pick of the week. So go get yourself one. If you head over to that product page, you can get 50% off right now, maximum of 10. Love to know what you're using 10 of them for. Maybe a self guiding solar panel robot. Who knows. Let me know. All right, that's going to do it. Thank you so much. And I will see you next week. Bye bye.