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.  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.   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.  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.  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 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.  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.  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.  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.


Live from Las Vegas, it's theCUBE, covering Dell EMC World 2017. Brought to you by Dell EMC. We have our coverage this year at Dell EMC World 2017. Huge show, record number of attendees here in Las Vegas, 13,000 plus, three days of non-stop Q&A just for you here on theCUBE, which of course is the flagship broadcast of SiliconANGLE TV. I'm John Walls along with Keith Townsend, who is the principal of CTO Advisors. Keep good to see you, sir. Good to work with you again, John. Looking forward to a big week, and I know a lot of excitement about Dell EMC and this new Converge company, if you will, and what they're bringing to the marketplace now. 13,500 attendees, has to be a lot of great stories to hear, I'm looking forward to it. And to help us tell a lot of that story is Bob Wambach, who's the vice president of marketing at Dell EMC, and Bob, thanks for being on theCUBE. Good to see you, sir. My pleasure, it's great to be back again, John. Yeah, tell us about maybe the vibe you got right now. I know it's early, but the keynote's just now wrapping up here. We've had David Blaine out on stage, talking about this magical transformation that Dell EMC is facilitating. Yeah, and I think that, to me, that's like the excitement is all about, everybody recognizes that we are on to a new era now. It's the, IT has really changed. Business is demanding transformation, and there's so much technology innovations that people can take advantage of. And our job really is to help them along that journey and to allow them to transform digital transformation for new applications, new ways of doing business, but the IT transformation to support that through infrastructure, and then workforce transformation and security transformation. So it's really, really exciting, and it's all here this week. So you have your customers looking at this and then thinking that, all right, we feel like we had modernized, and now you're telling us that we need to take it up a step, or they know themselves, they've got to ratchet it up a little bit. What are you hearing from people about maybe the headaches or the considerations that they have as this process or evolution continues? Well, I think there's a realization from almost all customers now that the old way of doing IT, where you select your server, you select your storage, networking, and then you put it together yourself, they spend most of their time trying to keep those things up and running. How do I validate new stuff coming into the infrastructure and test for interoperability? How do I patch and upgrade this? And that is a way of the past now. I think people see within public cloud has helped this along great. With public cloud, you are paying a fee and you have access to IT that is pretty much just there. So this idea of there's a different way of doing things is really brought itself into the on-premise infrastructure right now with the concept of private cloud. And hybrid cloud is both public and private on-premise. So customers have frequently seen the value of public cloud and they're saying I can't run everything in the cloud. In fact, what I've heard is there's a lot of stuff that I have in public cloud that I could run much more cost effectively if I had a productive on-premise cloud. And that's really what we've been focused on. So it's not the speeds and feeds focus, it's really how do you transform yourself so that you get out of this siloed environment and start thinking more in terms of converged and hyper-converged infrastructure and then developing hybrid cloud platforms on top of that? So Bob, as a customer, I understand speeds and feeds. Latest storage array comes out the VMAX 950X with the biggest IOPS. I understand that and I can translate that. How do you help your IT customers extract the value of IOPS to transformation? It's connecting what you're doing in the data center to what is happening in the business. That's really what it amounts to. And what has held people back is the day-to-day drudgery of doing everything in these siloed environments. So it's helping customers to assess where they are right now, how do you do things? How might things have to look like? How would you like things to run? And then how do we help you get there? So it's more of a focus on what does the business need and do you really need to worry so much about the speeds and feeds? Or is it more about how do I operate as a company? And really what we've seen with the converged platforms and solutions division is by offering customers pre-engineered turnkey systems that are fully engineered where the burden of the life cycle assurance is really taken out of their hands. There's a prescriptive way that these things can be managed, supported and sustained as a single system. And this really frees customers up to focus more on business priorities. So that's a different conversation than we're accustomed to in the infrastructure space.  What changes have happened inside of Dell EMC to help make that conversation inside the converged group? I think the first is a realization that this is in a sense a challenger situation for customers is that rather than asking the customers what they want, we're trying to offer guidance on we know you're in this predicament, you have to think about changing yourself. And it's not even so much a total cost of ownership of all this infrastructure. It's what is the value that you're getting out of it. So we've had a two year old initiative now called the customer value program that helps customers assess where you are and chart really a business value assessment of what you want to get out of it and then really create these, it's transformation plans for them. It's here's what you can do with your infrastructure, here's what you can do with your cloud plans and then here's how your operations and your organizations can change. There's certification programs that people can get, there's professional services that people can choose. And then we also, one of the things that I'm really a big fan of is the residency services where you get an expert who's done all this stuff before, they've done it at different customers, helped them transform. You can have this person come in and work with your team three months, six months and really become experts yourselves through this. So this is what we're really, really finding is, is that these programs that are set up to help customers help themselves have a tremendous amount of potential to help customers get along that journey. Any specific victories you want to share, customer stories? You know, I think when I look at it and there's a lot of victories, you know, I've been, I started out, you know, EMC long time veteran and then was in the VCE joint venture and as we go through and we look at what the customer experiences have been, there are customers that if you bought a V block and you treated it like all of your old infrastructure, you quickly turn it into not a V block and you don't realize a lot of value, like the V block didn't really help you and then there are customers that went in and transformed themselves, got tremendous amount of value out of it. What I find interesting are the stories of customers who either are very happy with their infrastructure but they haven't gotten value and showing them there's much, much more or customers that have bought it and then didn't realize all the value we got. One of our customers, a large industry customer, two years after they had their V block, we were looking at a refresh opportunity and they said, well you guys are definitely in the game but we're looking around at other options too and we were like, you know, why are you not happy with it? And they were like, well, we're happy but it didn't give us everything we wanted and we said, well, what did it give you? And they said, we use a lot less people to manage the infrastructure now. But that saved us money and we started, we applied this program methodology to it and as we dug into what were the changes now from what you had, they had millions of dollars a year and less downtime, right? So you think about the resources and the loss business, everything associated with downtime, their downtime had gone to zero, that was a million dollars a year benefit and they're like, wow, you don't think about downtime when you don't have downtime, you think about downtime when you're down. When you actually have downtime, right? So that was one thing and then the other is he said these people that no longer had to work on the V block, what did you do? Did they get laid off or what? And they said, no, we repurposed them and they started some new initiatives and we asked them what became of those new initiatives and it turned out these people, several people went off and they were working on new services for the company and they had a return of a million and a half dollars a year out of this new thing they had started. So it ends up, you can take customers just from understanding how you're supporting the business, how your infrastructure is supporting your attempts to support the business. Customers can really become their own champions of what they do. Like this IT team didn't realize how good they were compared to what they had been in the past and these are things that's very valuable for them to take to the customer. So those are the things, those are the examples I really, really like because you're showing customers that what you do actually matters to the business. It matters a lot. You're helping your company be more successful. Well, customer value is what it's all about and obviously you're bringing that home at Dell EMC. Thanks for being with us Bob. We appreciate the time and wish you a great show. Okay, John, thank you very much. Off to a super start. Keith, good to see you again. Bob Lomback, continuing here on theCUBE from Dell EMC World with more in just a moment. See you in about two minutes or so.


The International Plant Protection Convention, IPPC. It's a multilateral treaty that facilitates global cooperation to protect plants from harmful pests, such as fruit flies. Pests that may be introduced and spread through international trade. Fruit flies present a major challenge to international trade because if they are detected in fruits, trade may be stopped. That is why a set of international standards for phytosanitary measures, ISPMs, on fruit flies, has been developed and recently reorganized. When a country wants to export fruit, this set of standards can facilitate the process. It starts with the standard ISPM 37 for host status, which questions, can this fruit be a host for fruit flies? In other words, if the fruit, such as coconut, is not susceptible to the fruit fly, the pest cannot infest it. It is a non-host and therefore it can proceed directly for export. But if there is the possibility of the pest infesting the fruit, then the question is whether the fruit comes from an area that is fruit fly free. If it does, then it can go for export. But if fruit flies are present in the area, then the country must apply additional phytosanitary measures to reduce the risk of fruit fly hosts introducing the pest to the importing country. This scheme is called a systems approach. In a systems approach, the exporting country applies two or more independent phytosanitary measures. The integration of these measures will reduce the risk of pests in fruit trade to levels that are acceptable to the importing country, while contributing to assuring high quality of the fruits to be exported. The phytosanitary scheme under which trade might occur is defined and agreed by the interested parties, based on ISPMs or technically justified. This is done through a bilateral agreement between the plant protection organizations of both the exporting and the importing countries. Through the implementation of the international standards for phytosanitary measures, countries protect plant resources from fruit fly pests while, at the same time, they ensure the application of justified measures that facilitate safe trade.


Let's check out the latest phone here the LG booth the v30 which is I'd like to say it Kind of like a little bit. Oh my god. It's really nice Very very nice Very nice, and this is the first I mean the second plastic OLED phone from LG It's very impressive LG OLED, plastic OLED Let's check the specs right here 2880 x 1440 2x1 resolution for 6 inch OLED full vision display RGB RAM RGB flash Let's check it out. It's just really nice The phone shape is a bang in the old city sound I guess That's nice Now if only the price of the 399 or something like that and that's 799, I don't know what the price is That would be cool and shipping for the pixel all UI Bang a little sun audio Maybe they include the headphones maybe in the back So you get really good sound quality Hopefully Danish B&O is the best So that's all about the phone And here the demo is showing And there's all these daydream demos This is an amazing daydream device And it has enhanced voice protection Okay Google Okay LG Okay, do you know? Very smooth And that's why there are two lines So it's up to them, how many of them they sell I think it depends on the pricing We'll see, maybe they don't care about the price It seems nobody cares about pricing


Let's talk of the morning. We have the second lecture of Laurent de Villette about collision in Plasmas. So thanks a lot. And so I will try to speak at least a little of Plasmas and of collisions today. But first, I would like to finish the presentation of the example based on reaction diffusion for the entropy method that I began yesterday. So let me recall briefly the set of equations that I wrote down. If you remember, this is related to the reversible chemical reaction between two chemical species, which we will call A and B. And we defined the concentration of those species by small a and small b. So those are two functions of t and x, which are non-negative. t will be typically a time which is in r plus. And x will belong to a smooth bounded set omega, included in rn. And of course, for real applications, n is equal to 2 or 2, 3. Moreover, I suppose that there is a catalyst in the reactor and that its concentration is a function of x. And what I will suppose on k is that this is strictly bigger than some k0, which is strictly positive. So that varies. The catalyst exists everywhere. But its concentration can be bigger in some parts of the reactor and not that big in other parts. Then the set of equations that I wrote down is a set of two reaction diffusion equations, which writes like this. So the first equation concerns A. And you have a diffusion rate, which I will call d1 for this species. And then the reaction term looks like k of x times b minus a. And so for the second one, the concentration is denoted by small b. It satisfies also reaction diffusion equation, but with a different reaction rate, which I will call d2. And the reaction is just given by the opposite of the reaction term for the first one. So of course, this could happen. It really depends on the chemical situation. For example, if the catalyst is a solid, then it will be fixed somewhere in the reactor. And then it is a given function k of x. So that would correspond to what I'm writing now. But of course, you could imagine situations in which a catalyst is liquid or even in gas phase. And then, of course, it would follow the flow somehow. But if you are in such a situation, typically you would rather write down convection diffusion equations rather than just diffusion. So everything should be coupled with typically a Navier-Stokes equation for the solvent that you have. So this, of course, is one of the simplest possible models coming out of chemistry. And of course, it can be like, no, no, it's just, OK. So together with the equations, since we suppose that everything holds within a given domain, we should add boundary conditions. And the natural boundary condition, if you want to study the large-time behavior of the system, consists in supposing that the species are confined inside the reactor. And this corresponds to putting homogeneous Neumann boundary condition for the system. So we add something like this. So on the boundary, the scalar product of the derivative of the gradient of A with the normal n to the boundary is equal to 0 and the same for B. So these are the conditions which enable to do without difficulties, integration by parts, that I will perform in the sequel. OK, so let me finally add that, like the concentration of the catalyst, I will suppose here that both D1 and D2 are strictly positive, which corresponds to a situation in which basically A and B are both liquid, let's say, inside the solvent. So when you look at this set of equations, you can wonder what are the natural apriori estimates that you have. And the first one is that since A and B are concentrations, they have to remain non-negative. And I think it's clear here that thanks to the maximum principle, A and B will remain non-negative if it is true at time 0. So let's suppose that A at time 0 and B at time 0 are non-negative, and this will be propagated with time. So this is just a direct application of the maximum principle for both equations. And also, it's quite clear that because of the shape of the reaction term, if you add the two equations, you get 0 on the right-hand side. And so since D1 and D2 are not necessarily equal, when you add the left-hand side, you end up with something like DT of A plus B minus laplacian of D1A plus D2B is equal to 0. And if you want to get something out of it, at least at the beginning, the thing you have to do is just integrate in X. And in this way, you get that A plus B integrated in X is conserved, which is somehow the conservation of mass, if you wish, for the chemical system. So it's clear that D over DT of the integral of A plus B, this is equal to 0. And so without loss of generality, I will assume that omega is of Lebesgue measure 1. And initially, the total mass is equal to 2. So if it's not the case, it's possible to do simple transformations which enable to come back to this setting here. So the reason why I put 2 here is that what I wish is that, at the end, the equilibrium is exactly A infinity is equal to 1 and B infinity is equal to 1 in the domain. So in order to see that, let me now describe the entropy structure related to this problem. So here, the natural entropy is A log A plus B log B. This is the entropy which is given by physics. But it's easier to start from an entropy which is simpler, which is just the integral of A square plus B square in this case. So let's define H of A and B as the integral of A square plus B square, the X, that is the L to norm to the square of A and B. Actually, let's divide it by 2. So if I compute now the H of A of t and B of t, let's write it this way. And let's suppose that A and B are solutions to the reaction diffusion system. Then as you can see, what you will get is A dA over dt plus B dB over dt in the integral, like this. And using the equation, you see that this gives A1 A laplacian A plus d2 B laplacian B plus what comes out of the reaction term.  So you get A minus B here. And one way to write it is just to say that this is exactly B minus A to the square times K of X, like this. And in order to see that this quantity is non-positive, it's enough just to perform the integration by part at this level. And it's here that it's useful to have imposed the homogeneous Neumann boundary condition. So what I get is minus d1 gradient A to the square, minus d2 gradient B to the square, minus integral of K of X times B minus A to the square, like this. And this I call minus d of A and B with the usual notations, which means that this is the entropy dissipation for this problem. So as you can see, we have an entropy dissipation which is basically made of two parts, which are completely different. One part is related to the gradient. You can see it here. And another part is related to the reaction. And you can see it here. And there is no gradient inside. So this is a situation that you can obtain in a systematic way when you start from systems coming out of reversible chemistry. Whatever the number of species is, whatever the number of chemical reactions is, you get this structure. But in that case, in the general case, you better start with the entropy with A log A plus B log B rather than A square plus B square. Here it's simpler to do it this way. So let me add that at this level, in order to enter really exactly the structure that we described yesterday, we have to impose the functional space in which this is holding. And this functional space will be what I usually call E. And it will be made of functions A of x, which are non-negative, B of x, which are also non-negative. And such that because of this identity here, which is a conservation of mass, we will impose that the integral of A of x plus B of x is equal to 2, which corresponds to the initial data that we have here. Integral of A of x plus B of x. So that is the space E. So we already know that we have an entropy structure. Let's now check if this entropy structure is strict in the sense that I defined yesterday. That is, let's suppose that day is equal to 0. And let's A and B belong to E. Let's look at what it means. As you can see, the fact that this quantity is equal to 0 will mean that all the different terms are equal to 0. And since you supposed, at the beginning, that d1, d2, and k are strictly bigger than 0, this imposes that gradient A, gradient B, and gradient B are equal to 0. And moreover, A is equal to B. So in other words, you have for A and B two constants. And those constants have to be the same. And since you know that you have this equality here, remembering that we took a space omega, which is of the big measure 1, this imposes that A equals 1 and B equals 1, which is our equilibrium here. So the equilibrium will be defined by this. It's clear that if we suppose that we have an equilibrium for the equation, which means the solution of the elliptic system, which is here, just by multiplying by A is the first one, by B is the second one, and by integrating, I will get, this is exactly, by the way, the computation which is done here, I will get that day of A and B is equal to 0. So AB equilibrium also implies this. And it is clear that if A equals 1, B equals 1, then you get an equilibrium for the system. So actually, all of this is equivalent. And we get the strict entropy structure provided that H of A and B is the minimum at point A equals 1, B equals 1 of the possible H of A and B for all A and B. So in order to check that, let's define A as 1 plus something and B as 1 plus something. Let's define A as 1 plus alpha and B as 1 plus beta in such a way that because of this, the integral of alpha plus beta is equal to 0. Now alpha and beta are not non-negative anymore. So this is just a change of variables. So now if you write H of A and B in terms of alpha and beta, this is just the integral of 1 plus alpha to the square plus 1 plus beta to the square dx. And as you can see, just by expanding the second order polynomial here, you have the first term, which is just 1 plus 1, which gives you 2 because omega is of Lebesgue measure 1. So I get 2. Then there are the terms of the square. We just give you alpha square plus beta square. And finally, there are the terms 2 alpha plus 2 beta. But because the integral of alpha plus beta equal to 0, those terms do not appear actually in H. So that finally, I think it's clear on this formula that if alpha and beta are equal to 0, you recover exactly the equilibrium, A equal 1, B equal 1. And if they are not equal to 0, then this is strictly bigger. So this is strictly bigger than H of 1 and 1 if alpha and beta are not equal to 0 in the following sense. The couple of alpha beta is different from 0, 0. So we have a strict entropy structure thanks to this. So now, if you remember, next step consists in checking whether or not varies an entropy-entropy dissipation estimate. And let me write down what it means here. So do we have an entropy-entropy dissipation estimate? So since I'm lazy, I will systematically write EED. So in order to check that, let's write down what is the entropy dissipation and what is the relative entropy here. And actually, it's clear that for the relative entropy, it's better to use the variables alpha and beta. So let's write it in terms of alpha and beta. Let's say D of A, which is 1 plus alpha and B, which is 1 plus beta. Of course, for the gradients, it's the same to consider alpha or A and beta or B. So I will just write down D1 integral of gradient alpha to the square plus D2 integral of gradient beta to the square. And also, for B minus A, it's the same to write beta minus alpha. So let's write here. So this is D. And now what we have to know is whether or not this is bigger than some constant. Let's call it C0 as yesterday times the relative entropy, which is just H of AB minus H of 1 1. But H of 1 1 is just 2. So here, H of AB minus H of 1 1 is just this integral of alpha square plus beta square. And as you can see, the question becomes a very simple question of functional analysis, which is, is it possible to bound somehow the square of the L2 norm of alpha and beta by basically the H01 norm of alpha and beta plus something which relates alpha and beta. And this, of course, can hold only under the condition which is written here, which, in terms of alpha and beta, can be rewritten like this. So as you can see, this is just a sort of functional inequality question. And let me briefly explain, it actually takes four lines to just solve this. But I want to write down precisely those four lines because it's really the core of all the computations which are done for more complicated models. So let's try to proceed in a rational way. First thing which one wants to do is to take the infimum of d1, d2, and k in order to eliminate all parameters in the inequality. So here I take the infimum of d1, d2, and k, or if you prefer k0 with the notations that were introduced previously. And I take here the integral of gradient alpha to the square plus gradient beta to the square plus alpha minus beta to the square. This is a natural thing to do. Next natural things to do is to use Poincare inequality in order to transform the gradients in terms which directly involve alpha and beta. And here, since we are in the context of Neumann boundary conditions, the natural way to do it is to use the variant of the Poincare inequality, which is sometimes called Poincare-Wiertinger, in which you save the gradient to the square. So the h01 norm, if you wish, is bigger than the l2 norm of the function minus its average value on the domain. So this is Poincare-Wiertinger inequality. So up to a constant, which I will denote by p of omega, which is related to the Poincare constant of the domain, I can transform this equation like this. So remember that the domain is still of the big major 1, so the average is just the integral over omega of alpha here plus the same for beta like this plus alpha minus beta to the square. So in this way, I eliminated the gradients and I replaced them by the distance between the functions and their mean value. So as you see now, the whole thing is to understand why if you have two quantities which control the distance of functions towards the best constant, which represents a function on one hand. And on the other hand, something which tells you that the two functions are close one to another, you want to see why this implies in some sense, that you are close to a situation in which both the constants are close to one. OK, I don't know if it's clear. So at this point, actually it's a rather better idea to start from the other direction. That is to start from the integral of alpha square plus beta square and try to bound it from above. So let's try to do this. So now I look at the other side of the inequality, the integral of alpha square plus beta square. And at this point, the natural thing to do is to try to replace the functions by constants. And I know that I will, in some sense, allow to do that because I control both quantities. So here the natural thing to do consists in replacing alpha by alpha bar, that is this quantity, plus alpha minus this quantity. Since this is done with squares, there is a tool which will appear in the inequality. And I will get something like this. I hope this is understandable. I just used the inequality. Let me write it this way here. So I just use that alpha is alpha minus its mean, plus its mean, plus its average value, like this. And then I just say that alpha to the square is less than 2 times this quantity to the square plus this quantity to the square. And I did the same for beta. OK? So here you see that we are in a rather good shape in the sense that the quantities which appear here and here are controlled by the entropy dissipation here. And so in order to get a constant which bounds this in terms of this, I just need to show that those two quantities which are now numbers are controlled by the rest. You agree? And so this is the last step of this very short proof. So let's start from those quantities which are numbers. Now the natural thing to do, since we control alpha minus beta, is to transform alpha and beta in alpha plus beta and alpha minus beta. OK? So if I do that and I take care of the constants, I can write exactly this. So I hope I did not miss anything with the constant 2 appearing in the equation. And now it is almost finished because, sorry, I want to be a little careful, it's like this. Because the quantity which is here is exactly equal to 0. And it's there that we use this constraint in the problem. So this is 0. And here, as you can see, you have the integral of alpha minus beta to the square. And what you control is the integral of alpha minus beta to the square. So this is just Cauchy-Schwarz, which tells you. You just use Cauchy-Schwarz. And you get 2 times alpha minus beta over 2 to the square. And I hope it's possible to follow everything. But this finishes the proof that there exists a C0 which works. And as you can see, this C0, it depends on the diffusion rate, D1 and D2. It also depends on the minimal amount of catalyst that you have put in the reactor, that is the minimum of k of x. And it finally depends on the domain because you use the Poincaré constant of the domain. So let's say all of this is completely elementary, but is really what is in the core of all the proofs which are related to reaction diffusion systems coming out of reversible chemistry when you try to prove that you have exponential convergence towards the steady state. In this specific case, since everything is linear, it's really possible to do some Fourier analysis and to get actually the real best possible constants. And it's quite interesting to check how it fits with what is given to you by this very simple proof. And this has been done in particular by Clemens Felner. But this proof does not really use very much the linearity of the system. And it can be extended in many, many different nonlinear systems of the same form.  Let me first say that probably the first group which really tried to do this systematically is a group of former East Berlin around Gröger, Hünlisch, and Glitzky. What did I want to add on this? I think maybe that's enough on this reaction diffusion system. Yes, one last word about the fact that an interesting question is whether you can remove part of the hypothesis that I made. That is, can you, for example, suppose that D1 is equal to 0? Or can you suppose that K can be equal to 0 in part of the domain? And actually, this is all those questions which are quite interesting are directly related to controllability issues for reaction diffusion systems. So you can find the answer to that kind of questions in books on controllability of parabolic equations. So there is a link between the two fields in some sense. OK, so maybe it's time for me to give a few references about this part of the lecture. This is really a huge field, and it's not possible to quote everyone. But I wanted to quote a few groups which worked on these entropy estimates, first by saying that as far as kinetic equations are concerned, there was really a lot of work done on Fokker-Planck type equation. And I think that it was clear from the talk of Anton that we saw yesterday. And certainly, the work of the probabilist in the 80s of Bakri-Hemri is one of the most influential work in this domain. And I also wanted to quote actually this paper, which was, I think, already quoted by Anton yesterday, in which everything is written in the language of PDEs. And it's, I think, one of the most influential works of PDEs. And it's really very useful for people who do not come from probability to understand what happens. What I would like to present in the next talks is really works which are related to the papers here, which concerns the Boltzmann and the Landau equation. So I will not present it immediately. I will say more later. Let me add that there were works done on the coagulation fragmentation Smoluchowski type equations, which are also part, let's say, of kinetic equations, which are maybe not as well known as the works on, let's say, rarefied gas models. But I want to quote them. So there is one by Eisenmann and Bak, which is work from, I think, the early 90s, or maybe the late 80s. And this work has not been cited a lot, because probably the title was not exactly coherent with the, let's say, modern vocabulary on the topic. But I think it's an extremely interesting work, and I absolutely wanted to quote it, and also the more recent paper by Jabin Nidhammer on the domain. So this was more to explain what happened on kinetic theory. But I also wanted to say a few words about parabolic equations. And so this last example corresponds to the setting of reaction drift diffusion. I already quoted Glitzky, Gruger, and Rünlich. And I worked also a lot on this field with a Clemens Felner in the past years. But there are also works on completely different equations or systems. And I think it's interesting to see that there are a lot of works done on nonlinear diffusion. One of the first ones was done by Delpino and Dolbo. And there are also many works done on equations of higher order, like Allen Khan and that kind of equation. And I wanted to quote at least this paper by Kaceres Karyotoskani. But there are many more recent papers on the same subject, which is, I think, quite interesting. Anyway, this is just a small sample of many, many works which have been done on the question. For the method itself of entropy, what I presented yesterday, I think it's very hard to find what would be the earliest reference for this method, because it has been used probably for many, many years without using necessarily exactly the same vocabulary. But I would say that this method was already quite well known in the 70s for PDEs. And for ODEs, I think one should go back maybe to Lyapunov himself to find, let's say, the first works on this topic. So I preferred maybe not to cite people directly on this, because it's quite hard to find who first used it. Maybe I will stop for just a few minutes and ask you if you have questions on this first part, because now I will present a quite different topic. Yes, please. Maybe just about this kappa of x. So you just need it to be positive on a set of positive measures inside of omega, right? Yeah, more precisely an open set, a small open set. Open? I think one should check the latest papers on controllability, but I think I'm sure that it works if it is an open set. Then maybe it's enough that you have a strictly positive measure. Another question. So you mentioned that from the physical point of view, a log a plus b log b would be more natural as an entropy. So what happens if you redo the same computations with that entropy? So what kind of? So actually it's what I should have done in reality. So it's just that with using this simpler entropy a square plus b square, it's really easier just to present it in this specific case. But this is typically something which cannot be extended for more complicated equations. If you start from the real physical entropy, which is the one based on a log a plus b log b, what will happen is that first you can treat many more systems. And then the main difference is that when you compute the entropy dissipation, you will typically get a fissure information instead of an h to 0, 1 norm to the square. So you would have to prove some log sobole of inequality at that stage of the? So sometimes one of the possible tools is a log sobole f. But also let's say that it's also sometimes useful to write it as a gradient of the square root of a to the square up to a constant and then to work on the square roots. Because the reason for that is that instead of getting a minus b typically in the reaction term, if you use a log, you will end up with terms like a minus b times log a minus log b. It looks more like this. And then there is a natural inequality, which is that this is bigger than a constant, which is actually maybe 1, but I'm not completely sure, times square root of a minus square root of b to the square. This is a very easy computation. And so since you can write the Fisher information in terms of the square root and also the reaction term in terms of the square root, sometimes a good idea to work with the square roots. Well, the price you have to pay usually is that the constraints, such as the one which is written here, is not so nice once you use square roots, let's say. And then just to find a question. So if you tell the story this way, it seems that the Poincaré constant of the domain is kind of crucial to have convergence equilibrium. And this, I mean, is not clear because that's just this proof, right? So somehow, if the domain has spikes or? Yeah, so for bad domains, let's say you will have bad constants, that's true. But maybe it's a better idea to use a different way of controlling the difference between the function and its average than to use Poincaré inequality. So for example, you could use Sobolev type inequality or you have, let's say, different type of inequalities which will control this. So you would expect that the convergence equilibrium is independent of the Poincaré constant, in a sense? No, no, I would not say that. But what I would say is that the Poincaré is maybe not the best tool for everything. But anyway, if the domain is very strange, you will have problems for controlling the difference with the average by the gradient. Are there examples? Look, yeah, take a halter, typically, a dumbbell, sorry. So take a dumbbell size type domain, something like this. OK. And suppose that this is very thin, then you will have some trouble for controlling the. And so typically, for example, you can have situations in which also the diffusion terms are, let's say, big here and small here or things like that. And you will have some trouble controlling this part with the. So if you're looking really for best constants, I think they will depend on the domain. Maybe not directly through the Poincaré constant, but they will depend on the domain somehow. OK, that's interesting. Anyway, it's clear that for I did not write this on the board I should have, but if you do not have a connected domain, then it's clear that it doesn't work. In cases like this one where you can have different entropy functionals, do you expect that the physical one will yield a better convergence rate? No, I'm not sure. Actually, I would say that in situations in which you can use the L2 norm, it's usually a better idea to use it. But there are not so many cases in which you can do it. And I would say that as soon as you have nonlinear terms, it's really difficult to avoid using the physical entropy. OK, thanks. OK, so thanks. So I have still 15 minutes to present quickly the Boltzmann equation. I'm not sure that it will be enough, but I will try. So the equations I want to describe now are models which were written respectively around 1860 and 1940. So the first one is a Boltzmann equation. And it's based on the idea of Boltzmann that it should be possible to describe a gas by looking at binary collisions between the different molecules of the gas. So this is the second part. So Boltzmann and Lando operators and their entropy structure. So the idea is that in the spatially homogeneous context that I will present, the unknown is a density of molecules which, at time t, have velocity v in a rarefied gas. So we also suppose that the gas is actually monoatomic. I will not say too much about this, but this is an assumption which is clearly not satisfied by the air, for example. So the idea of Boltzmann is that with this quantity here, actually, this was already done by Maxwell, seemingly, but well, anyway. So the idea was to try to compute the evolution of f due to the binary collisions. And the first assumption is that those binary collisions happen on a scale of time, which is extremely short with respect to the time, to the scale of time at which you observe the evolution of the gas. So let's say the time for collisions is very small with respect to the time of observation. Because of this assumption, we will write an equation which is autonomous in terms of ODE vocabulary. Or if you prefer, the time t will be a parameter in the equation. So we will say that df over dt of t and v is equal to a certain operator which acts on f at a given point v. And t here is a parameter in the operator. But the tradition is to forget about this abstract equation and to write it q of f of t and v, which I will do from now on. Then the second assumption is that all collisions are binary, which means that we do not take into account collisions between more than two molecules. And this is directly related to the fact that the gas is verified. If you imagine a gas which is quite dense, there will be collisions between more than two molecules, which will have an effect on the evolution of the density. So we look only at binary collisions. This is the second assumption. And because of this, the point is that you can write the equation in the following way. So you first have to take into account the possibility for molecules which had the velocity, let's call it v prime, but after a collision with another molecule, it will get the velocity v. So this is done in the following way. You look at the joint density of molecules of velocity v prime and v prime star. And you multiply by the transition rate, which I will write in this way, which tells you that after a collision between molecules of velocities v prime and v prime star, you end up with a molecule of velocity v. And you integrate over all possible molecules of velocities v prime and v prime star. And you also integrate over all possible velocities of the second molecule which appears in the collision against all of this. Let's draw a small picture of a collision. We have two molecules which have velocity v prime and v prime star. Here they interact very quickly. This is the assumption which is here. And after the collision, they end up with respective velocity v and v star. And this tells you the amount of production of molecules of velocity v. But you also have to take into account the possibility that you have a molecule of velocity v, which collides with a molecule of velocity v star. And after the collision, the velocity v is changed. And so you have to remove from this kernel the corresponding quantity. So this is done in the following way. So you still integrate over the same variables. But now you put here the joint density of molecules of velocity v and v star. And you look at situations in which after a collision, the velocity v and v star are changed in velocity v prime and v prime star, like this. OK? And now here, as you can see, I wrote this F2 here, which is actually not something that you can compute out of F. This is a joint density of molecules which have velocity v and v star. At this point, one needs an assumption on the fact that actually this can be factorized in F of TV times F of TV star. And this is related to the assumption of chaos. And when someone wants to really prove that this operator is related to the Newtonian physics, let's say, of n particles, one has to show that this chaos assumption is, let's say, is true, holds, starting usually from an assumption that it holds initially. This is sometimes called propagation of chaos. So here, this means that F2 of TV and v star is just the product of F of T and v star. So this is an assumption on the dependence of the distribution, the joint distribution with two different velocities. So once you do this assumption, you get something which is closer to an equation. That is, Q of F is now the integral of v prime, v prime star, and v star of F of TV prime star.  And all of this dv prime, dv prime star, dv star, like this. Next assumption is that there is micro-reversibility. So here, this corresponds to situations in which you had previously a molecule of velocity v. And because of a collision, it will get another velocity. So you have to remove it from the evolution. Q of F is just dF over dt. So you have to remove it. So next assumption is called micro-reversibility. And it is related to the fact that in a process like this, at the microscopic level, at the level of the evolution of molecules, this comes out from Newton style equations, if you wish, or if you prefer from quantum dynamics. But anyway, the equations underlying this process are reversible. And so the probability which are written here, or the transition rate which are written here, they should be equal. So micro-reversibility says that this is identical. Let me write briefly the result.  Next hypothesis is conservation of momentum and energy. So conservation of momentum does not cause any trouble. It's a sort of universal law of the universe, if I can say. Sorry, this is recorded. Then conservation of energy actually leads to a certain number of troubles. And it is also, of course, a universal law. But then it depends on what you call the energy. And the point here is that the energy is exactly the kinetic energy of the molecules only when the gas is monohatomic. If not, there is also energy in the internal degrees of energy, which is related to the rotations and vibrations of the molecules. So here we really use the hypothesis that the gas is monohatomic. So conservation of momentum and energy. So here kinetic energy because the gas is monohatomic. And this means exactly that this transition rate is nonzero only when those quantities are conserved. So another way to say that is that up to a certain function which depends on everything, this is multiplied by a direct mass on conservation of momentum and a direct mass on conservation of the kinetic energy, which I will write like this. Of course, this is to be understood in a reasonable way. And we will see then how to parameterize this set. Yeah. No, no, no. So those are assumptions which are completely different. And the last assumption is Galilean invariance, which means that you should get the same equations if you move your reference frame by a given velocity or if you sort of rotate it. And this implies that this quantity cannot really depend on v and v star independently. It has to depend on v minus v star because you can move the reference frame at velocity v. And in fact, on the modulus of v minus v star because then you can rotate it. So Galilean invariance implies that actually this function, which is sometimes called cross-section, that actually cross-sections means that you have, well, this is a function which is related to this one, to be precise. So this function has to depend only on the modulus of v minus v star. And then if you look in the reference frame, let's say of the center of mass of the molecules of velocity v and v star, then you can see that the velocity is then v prime minus v prime star. And thanks once again to rotations, you can see that then it can depend only on the angle between v minus v star and v prime minus v prime star. This is the angle. So actually the Boltzmann equation is written here knowing that p has to have this form and that b can depend only on both variables. So let me show on a slide the final result of all this procedure. Here you have the final result for the Boltzmann equation, for the Boltzmann operator. And I would like to insist on the fact that the notation, which is here, is slightly different from the one which is here. Here I use q of f and f. This is just to emphasize that actually this is a quadratic kernel with respect to f. So this is usually what you find in books. For the rest, I think it's really completely identical to what I wrote down here. I just also emphasize here that the integral here is on rn times rn times rn. n is typically equal to 2 or 3. And because of the direct masses that you have here, you can drastically decrease the number of unknowns here. Because here you have basically n conservation. So you can remove one of the integral if you wish. And here you have one extra conservation, which means that you can also decrease here by 1 the integral. So instead of having 3n, you can typically have 2n minus 1. But this I will maybe detail in the next talk. So I propose to stop here for this. OK, so let's thank Laurent.


Hey everyone, happy Tuesday, September 7th. Welcome back from your long Labor Day weekend. Good way to get started for the week, plus $1,566 day trading this morning. Did two mighty 90s, one in DKNG that ended up being a scratch plus five bucks and one in Microsoft for $190. I did a test pairs trade with a version I'm still testing, so not really posting yet.  So let's check these out, show you what we did here. Let's start with the mighty 90s. We'll start with DKNG. This should have been a bigger winner. DKNG was coming down, had a little bit of a volume pop coming into this key level, got long right here, chopped around, popped up. I really should have been out. I wasn't paying attention. I should have been out right here on my second technically green bar. I was waiting for it to go higher and kind of thinking of it as managing a runner. And when it pulled back here and flushed down, I ended up cutting out of my last piece. So I got out a half of it for a nice profit, and then the other piece for loss of net net scratch plus five bucks on the trade, Microsoft plus 190. So Microsoft, a little volume pop here on this flushed down got long right here, got out of most of my position as it bounced back to this pivot, which ended up being a good choice. I didn't want to wait for two full green bars, which ended up being a good choice because it kind of chopped down. Now it did end up later pushing up, but that's not the basis of that strategy. So a nice trade there, booked 190. Tesla onto the runners, Tesla plus 470. So Tesla had this initial strength. Get over here. There we go. Had this initial strength in the morning, decent size second volume bar. So I was watching it. It's kind of just chopping around, chopping around, chopping around. Finally, I was like, okay, I think Tesla looks like he wants to go higher. It's just kind of pausing. So I got long literally right there, pushed up, got out of half, sat through this little draw down and waited for it to get up to the pivot and got out of the rest. So nice trade there in Tesla for plus 470. Apple plus 336 gave a little bit back on Apple towards the end of the morning here, but had a nice, nice big volume spike there. So when it pulled back, got long, got out of some pulled back, jumped back in, got out of most of it up here. I held onto a couple of contracts and then when it fell down here, I ended up just cutting out. Obviously see a bounce after that. So it could have got most of that back, but still nice trade in Apple plus 336. Facebook, my biggest winner for plus 625. Let's see. Facebook, Facebook was a nice one. So Facebook, so it pushed up into positive territory, came down, pushed up. When it pulled back here, got long looking for another push higher. It's just under all time highs and caught this move here. And I think I got out of my last piece right in this area here. So nice winner in, nice little runner, runner in Facebook.  This is one that was my last trade of the morning. I love the setup, but it did not, it definitely did not work. Big spike in volume here when it pulled back, looking for a continuation higher. I almost got out of half on this little bounce from here to here. Didn't quite hit it. And then this thing just rolled over. I added to it, thought it still might have a chance to go. And it just kind of stayed weak. And when it started chopping here, just got out. Good news is I stayed small in there. I was just, I was kind of done for the day. And I, and then I saw this come up. So I jumped in with small size, but did not work out.  Airbnb, lastly, nice runner in Airbnb. As it was shown strength pulled back to Mondays. Let's see what, no Fridays. Hi, that blue line there got long, got that move up and was out. So that's my day plus a total was plus 1,566 on the day. Good way to start the week. We'll be streaming every other day this week. Look forward to seeing you all in the live stream room tomorrow. See you then.


Good morning, everybody. Today is Monday. TGIM. I love Mondays, everybody. December 10, 2018. Just getting to my computer here. This is Chick Forks Factory. We got... ...and USD. Jolt's job openings. Jolt's job openings. That's not high-impact news. That's low. And that's it. That's it. That's coming out at 10 in less than about 20 minutes or so. As you can see, no signals yet. We're just being patient, everybody. Hope everybody had an awesome weekend. We're just looking for our signals. Let's see. No, nothing yet. It looks so good, but I didn't get a signal and that's fine with me. Just looking at everything. Don't want to be in this move. Again, I got to be very disciplined. This is a test, an exercise, and discipline. I'm liking Apple. I'm waiting on a signal here. There it is on the five-minute charts. Let's wait for just a tad bit before we actually get in. I want to see more of this candle here. Jolt's job openings. Numbers came out and lower. Let's see. The previous was 7.01 million and the forecast was 7.22, but the actual is 7.08, so less than expected but more than the previous. I'm not sure what that means exactly. Let's see what the markets do here. Getting a signal on Facebook here. Facebook 142 calls. Don't really like the spread. Getting another signal here on Facebook and it's stuck. It's stuck, but my goodness, it's just not really doing anything here. There's no real surge in volume in Facebook. There might be an opportunity to trade spy puts. By the looks of it, it seems like we're still off by quite a bit, but just putting it out there. Spy puts, I'll be looking at trading at the 262 puts that expire in two days.  I didn't get a signal on spy. Sure, these are some really good moves here. Really good moves, but I did not get a signal. That's fine. Got to learn to be disciplined and trade my strategy, trade my system. I did get two signals out of all six underlying securities, and both of them were bad. I'm glad I didn't get in them. They just, to me, visually, they didn't seem strong enough and I was correct. What's going on, everybody? Today is Monday, December 10th, 2018, and although I love Mondays as a day trader, isn't it weird? Isn't it funny how we love, we learn to love Mondays?  It took a lot of patience. It took a lot of discipline to get through the trading day today, but that's okay. That's absolutely okay. Sometimes the best trade is no trade at all. Spy, the markets, did move down lower, but as I'm making this recording, it's moving back up. Good thing, bad thing. I'm not sure. As you saw, I did get two signals. Those two signals were bad ones. Anyways, to begin with, thank goodness I didn't get in. There's still an element of intuition and personally, I think that's bad. What I'm trying to achieve is get the human emotion out of day trading, which is ridiculously hard, but I'm trying to build that system that you can count on to get you into trades. Not necessarily out, but into trades, but I'm still working on it, so bear with me. Big news, big event happening tomorrow, guys. You guys are going to want to stick around for this tomorrow. I am hosting my very first podcast, my very first interview tomorrow. I have yet to put down a time when it's going to happen, but I will be interviewing Lindsay Duff. She runs a YouTube channel and a website. She's a real trader. In my opinion, she's a real trader. Check out her YouTube channel. I'll link it down below. Her YouTube channel is responsible day trading. Again, I'm going to put a link down in the description to her YouTube channel. Go check it out, guys. Really cool, but I will be interviewing her. Comment down below if there's any particular questions that you would like me to ask her in that interview. See if one of your questions and make it into the interview, guys. Also, maybe we can be hosting live any question and answer section towards the end of the interview. So stick around, guys. Really cool things that I'm going to do with my YouTube channel in the coming year. So thank you everybody for sticking around. I love all the support, all the love that I'm getting from my viewers, my subscribers. I greatly appreciate it. Don't forget to hit that subscribe button if you haven't already. Also, that bell notification so you get notified the moment that I upload a video. Thank you, everybody. I hope everybody has an awesome day and see you again here next time.