Today we're opening another box from Duelist Kingdom Cards. What's up guys, we're back with another epic video. Today we're opening another box from Duelist Kingdom Cards. We've been sent multiple packages that were shadow games inside and they've all been really fun. You guys have enjoyed them. Let's see what he sent this time. The box is the biggest one so far. Let's open this thing up and figure out what's inside. There's usually giveaway in here, so let's see. So first we have another gold package. It says open. If this looks like there's a lot of Christmas stuff in here, so it's like Christmas theme is pretty exciting. All right. First off, we have a couple of envelopes. It looks like the instructions. Read first and then cards. Read first. Okay, we're going to read this first. Inside, we have another note. Let's see what shadow game will be this time. Okay, here is their card, Duelist Kingdom Cards. Ruxen, congrats to you and your subscribers victory in our previous duel. Yeah, we did it, guys. Let's go. It's been a while since I've been defeated that badly. I've decided that I must go retrain and build a new strategy. In the meantime, include in this package is an invite for both of you, you and your subscribers. If you wish to enter the Duelist Kingdom games, see you all at the top. By the way, guys, I tweeted out the winner of the first place gift. If you guys remember it, we didn't open up the first gift. I think I was supposed to, but he showed what it was. You guys can go check that out on my Twitter at Ruxen34. PS, with it being this time of year, I thought it would be fitting to give a little back to you since you've given so much content for us. Enjoy the early Christmas gift. Let's go to accept open the envelope entitled Duelist Kingdom Games Invitation. What if we just like didn't open it? All right. The invitation is inside. This is a white envelope. Normally they are not in the white envelope. So I wonder what that means. Does that mean anything? Greetings, fellow Duelist. It is my pleasure to extend you this very special invitation. You now hold in your hand the key that will lock an amazing new world of action and adventure. I am now sponsoring the Duelist Kingdom Games, the likes of which have never been seen before. And you, my very special friends are invited. By the way, we're the special friends, me, you guys. The games take place inside Ruxen34's YouTube channel. If you've not yet subscribed, I highly suggest you do. I agree. I agree. This is a, I like this letter. These cards and star chips entitle you to enter. There are two star chips for Ruxen and two star chips for his subscribers. So here are star chips like literally star chips. These are so cool. Each player must obtain at least 10 star chips to enter the final shadow game, which will be a duel between me and the qualifier slash qualifiers. There'll be several opportunities to collect more star chips in the form of three shadow games, the first of which is included in this package. There are three more packages coming. These shadow games will include some prizes for participants and addition to star chips. The games start now. All right. Now we got to open shadow game number one. So we got to get our star chips out. I don't think it's set what to do with this. So we're just going to keep it sealed for now. Maybe we'll figure it out. I don't know. This is the next one. So we got to unscrew the envelope. I always thought this was funny. This is a simple memory game. Open the package with the cards label on it and shuffle the deck without looking. Place the cards face down in four to five rows. There are 20 cards in total, 10 matching pairs. Each turn, flip over two cards. If they match, add the pair to a win pile, not return them to their places. Repeat this process for 15 turns. Each turns counts as one regardless of if it's a match or not. For every two matching pairs, four cards total, you guys correctly. You win one star chip. There are five star chips available, 10 pairs, five star chips, one star chip for each two matching pairs. Oops. Two of the star chips already got taken off to unscrew the paper. In addition, for every matching pair of cards you collect in your pile at the end of 15 turns, you win a gold bagged prize. Feel free to open after you collect your star chips and prizes. The remaining star chips go to your subscriber player and the remaining gold bagged prizes are for giveaway to be continued. I think we got to open this. Let's see what this is. Ah, yes, the Duelist Kingdom cards. Very cool. Yeah. I mean, that makes sense for what this is inside. We have more cards. Let's see. Here's the memory game. We can win some prizes.  Let's go through what cards they are. They're Exodia, Obelisk, Red-Eyes, Slife of the Sky Dragon, Dark Magician, Black Clash of the Soldier, Dark Magician. Yeah, there's pairs. So Obelisk, Seal of Ordecalcos, the Wing Dragon of Ra, Dark Paladin, Seal of Ordecalcos, no Dark Paladin, Blue-Eyes. And yeah. Okay. So there's all our pairs. We can go 10 of 10. It's possible. We have 15 tries. We can miss five. It is possible. So let's shuffle these up. I like these sleeves. These are very nice. Okay. He said five by four rows, but we don't really have the right camera angle. So we have three by six with two on the side. So that's how we're going to do it just so it's all in frame. I'm not going to be cheating. I promise, guys, we're going to do this. So let's see. We have 15 tries. So I'm going to try and keep up with that. We're going to start off by doing this. Okay. So we have Red-Eyes right here on the edge. I'll show you guys right there and we'll flip it back.  So we flip that one. I'm going to flip this one as well. Figure out what this is. So we have Dark Paladin, then Red-Eyes. Okay. Dark Paladin, Red-Eyes. Let's see. Let's go to the next one. Let's try just to keep in mind. Dark Paladin, Red-Eyes. We have Exodia right there and then we have Black Luster Soldier. So Dark Paladin, Red-Eyes, Exodia, Black Luster Soldier. So hopefully eventually we can get to something we can actually match. So I'm just going to go in order to figure out what it is. So we have Obelisk and Seal of Ori Kalkos. So we haven't found a single match yet. So let's go into that. So that's three times. Exodia. Okay. Here's another one. So we can match these two. All right. We won one. So that's our fourth try. We have won one. All right. So let's see if I can remember. I think it was Dark Paladin, Red-Eyes, Exodia. Was it Black Luster Soldier? This is Seal of Ori Kalkos. I don't really remember this one. We'll try and see what we can figure out. So Seal of Ori Kalkos. I think this was Seal of Ori Kalkos. Okay. So five. We have gotten two matches now. So not bad. That means we're going to get to open two packages. We're going to keep that for the end. I think we've done five. I'll have it in the end. I think we've done five. So there's a Red-Eyes. Okay. There was a Red-Eyes. It was Dark Paladin and Red-Eyes, right? Red-Eyes. Okay. There we go. So we've gotten three out of six. Is that right? I think that's right. Three out of... That's actually pretty good. We'll take that. Then we have Sly... Ooh, was this Slyfer? Was it this? It was this. No, it's Obelisk. Oh, okay. Obelisk. Maybe we hadn't seen Slyfer yet then. Okay. We missed that one. Three out of seven. So Obelisk Slyfer. I think this is Black Luster Soldier. This is... Wait. Obelisk. Okay. And then we go here. So we're now four out of eight. Not bad. Four out of eight. Next we will go Wing Dragon of Raw. We have not seen that one yet. So we're just going to have to guess randomly what it is. It's got to be one over here because we know it's not one of these three. Ah, let's just... Let's just go with the next one and see what it is. Okay. Blue-Eyes, White Dragon. So Blue-Eyes and Wing Dragon of Raw. Can we sweep the rest of the way? Let's see. We've got Wing Dragon of Raw. Wing Dragon of Raw. Okay. So we're now six out of 11, I think. Then we go to... Okay. Black Luster Soldier. This was Dark Paladin. This was Black Luster Soldier. Okay. We got that. This one over here on the far right is Blue-Eyes. Was it this one? I'm about to choke. Don't choke. Was it this one or this one? Is this Slyther? Did we get Slyther already? Wait, I can check, right? Is that cheating? Did you check what we've already gotten? No, Wing Dragon of Raw. I can check that. We already won them. Slyther is still here somewhere. I think it was this one with Slyther because I thought that it was Obelisk or something like that. This is Blue-Eyes. Yes. Okay, we got it. We got it. Okay, okay, okay. We got Slyther. This one. Slyther. Okay, okay. Dark Magician. Oh, no, we haven't seen this one. It's a game of 50-50 chance because we know this is Dark Paladin. So one of these is Paladin. One of these is Dark Magician. If we get it right, we get all 10 right, which is pretty good. I mean, nine is also good, but 10 out of 10 is really good. One of the chances that I shuffled both Dark Magician back to back. This has to be Dark Magician, right? This is what we're going to go with. No! We missed it. Wait, that means we only get eight. No, no, that doesn't mean we only get it. We missed this one. So we picked the wrong one here. These all go back down. And then I flipped these over and get this right. So that was our 15th guess. So we got nine out of 15. We were so close to getting it perfectly. That was fun. I enjoyed that one. So let's, I can't remember exactly what our rewards are. Let's go through this. Okay. So we guessed nine matching pairs. So we get four because 10 pairs equals five. So I guess it doesn't round up. So we're going to get four Star Chips. That's not bad. And then one Star Chips for every two magic. Yeah, every two.  So we get four bag prizes there because we got eight. We got nine. And then the remaining Star Chips go to the subscriber player and the remaining gold bag are for giveaway. So sorry guys. You only get one giveaway. It's probably good that we got you guys a giveaway. You know, all right. So now for the fun part, the opening. We do have two rucks in from the subscribers. So that's going to be last. We're going to open up our rewards first. Then we're going to open up this gift. Okay. There's actually 10 prizes, not five. So I get nine. You guys get one. Sorry guys. I think we will save you guys for last. So we'll open up mine nine and see what I get. And then you guys can, you know, get excited and hope for what you guys are going to get. All right. So what will be inside potentially? I mean, this is, this is like Christmas early. This is exciting. This is like almost like candy. What's going to be inside here? We have a, oh, what is this? What is this? You can collect all 20 Yu-Gi-Oh toy monsters. Burger King. We have save $3 when you buy one new movie. Monster Blood Shining Dragon. Yeah. That's old school. Man, I kind of remember these actually. Oh my goodness. I had not thought about these in a very long time. What monster are we going to get? We got the Catapult Turtle. These are so cool. Oh my goodness. This is so awesome. Catapult Turtle. This is sick. Okay. We finally got all of these triangles out. Kind of takes forever, but let's see what is inside. So yeah. There's actually a little list of what we can get here. Let's see. So inside we can get the bait of the Magnet Warrior. We can get the Labyrinth Tank, Baby Dragon, Ixote of the Forbidden One, Mystical Elf. This is, what is this guy's name again? The Rocket Warrior. There we go, Caribo. Is that Beaver Warrior? We got Parrot Dragon, Wing Dragon, Guardian Fortress, the Kraken Guy. That's the Catapult Turtle we already got. The Pump King. We've got, that guy looks like Scyther. Who is this? Oh, that's the, the Maneater Bug, of course. Then we've got Gate Guardian, Silver Fang, Time Wizard. Who is this? Who is this character? I can't tell. Lajin and Big Show Gardenus. So we'll see if we pull that guy. I'm not sure who that is, and that'll maybe make it a little easier because he's not so small. We have first the Labyrinth Tank. Check him out. Labyrinth Tank. You'll love to see this guy. This is really cool. So yeah, need a little bit of this. Well, he can drive himself. Then next we have the Rocket Warrior. There, I don't know what the means, but I just said it. The Rocket Warrior. Check this guy out. What's up with his face? Come on, buddy. So far, no duplicates in our three. Let's see what we can get. Oh, I jinxed it. I literally jinxed everything. It's unreal. Okay, Labyrinth Tank. Cool. Next we have, I don't know if Silver means worse. Does that mean that's like not as good? We're about to find out, I guess. We have, yeah, another one. Another dupe. Like I literally said, no dupes. And then back to back dupe. Yeah, I had to say it. Three more pyramids. We have another catapult. What's up with the duplicates? So now we have two of each of those. Okay. We got a gold. What does the gold have? It has, no. Is this a joke? Another Labyrinth Tank? Oh my goodness. That's three. I shouldn't have said anything about the dupe. Why is this thing sticky? Ew, it's sticky. Ew, put it back in the plastic. Some kid got that one had barbecue sauce on his fingers. All right, let's go with the Silver one. We have, oh, it's a different one. Yeah, Wing Dragon Guardian of the Fortress. He looks like he's on a cloud on this thing. Oh yeah. That guy, that's one of the coolest ones yet. And finally we have the gold. We have, who is it? Beta, the Magnet Warrior. Okay, we did not get Exodia or the Gate Guardian, unfortunately, but that's still pretty cool. All right, we'll take that. But don't worry, we still have a gift for the subscriber. All right, here's what the subscribers will win. They win if this is Exodia. Oh, it's another beta. What in the world? So we just got like two of each, it feels like. Beta, the Magnet Warrior. That's pretty cool, so you guys can win that. And the final part of this video, we have our gift. This is to me from you guys. So thank you so much, everybody. Thanks for contributing to the gift. I'm sure that you guys all contributed and got me something epic, so I appreciate it. Let's see what it's gonna be. Early Christmas gift. How do you open this thing? Oh, oh. The Bacanum Moth. This is us. Early on, we were just a small, insignificant moth. But little did we know, we would soon become the Grande Moth. That is epic. Thank you, everyone. Duelist Kingdom cards, as well as subscribers for supporting. This is an epic mug. This is really cool. Maybe I can get Chelsea to use this while she drinks coffee. I don't drink coffee, but she needs to appreciate the moths. If you guys enjoyed it, make sure to hit the like button so I know you guys like these type of videos because I've been really enjoying these. They're like a fun switch up from opening. We still get to open stuff, but it's not like the exact same like packs every time. It's like a little bit different and exciting. By the way, I have four starships, so I'm gonna be dueling soon. I'm gonna be heading to the Duelist Kingdom finals. You guys better watch out. Shout out to TCG Trusted Cards Tomefo Show, Tomato Juice, NOAAJ, Stanley, Mike, Nance, Mimic, Gecko, Duelist Kingdom Cards, and Spanky McFarlane. Thank you guys for supporting the channel. I'll see you guys next time. Peace.


Well, thank you and thanks for coming back for after the break and Yeah, quick introduction. I'm Derek Boyas. I'm with AMD I've been a AMD as a product manager for the GPU compute software stack for the last five and a half years and so through that time I've spent to Looking at Pytorch has one of the main machine learning frameworks and I'll give a little bit of a history today and Some introductions of some interesting libraries have been working on So as part of AMD AI is really one of the key pillars it's Important for both training and inference, you know in the cloud and edge devices we AMD is a wide range of hardware and we see that AI is becoming so pervasive across the industry, you know Everyone here knows about that based on even the last few months of interest and Really want to talk about today the different hardware platforms How those are enabled with Pytorch and then some additional libraries? so first in the machine learning flow, there's Different amounts of compute required for the different components. So in pre-training It's really intense of large number of servers You have many GPUs or other accelerators to connect with a large amount of data The fine-tuning and you've seen all the papers come out recently There's a lot of ways to reduce the amount of data required. You want to iterate quickly and then on the inference side It's all comes down to Latency throughput How fast can you respond and get that answer out? so through all these different use cases you have different hardware requirements and with AMD's has a large suite of devices and everything from small CPUs to large accelerators I'm in the data center GPU Component group. So the instinct is the brand of the product But really it depends on what your application is. You can't just say oh, you need to use this device It comes down to what is the the workload you're doing? What's the performance? What's the the power is actually quite important again depends where you live power is Rising very quickly. And so if we look at the suite of devices This helps give a bit of an overview of the branding and on the left-hand side the CPUs are Called Ryzen and Epic. So Epic is a server CPU. Ryzen is the more client CPU and Pensando is the Network processing component. It's a company AMD bought last year on The accelerator side we have the Radeon graphics cards So those are also used for gaming, but they contain a lot of math accelerators And then the instinct is the data center GPU component which has a lot of matrix math operations high-performance compute support for running in large Systems like the frontier has a exascale type class system and it doesn't have the graphics components So you can you don't do a lot of graphics modeling or the ray tracing And then and the adaptive computing this is on the Xilinx acquisition. So AMD acquired Xilinx last year as well And so there's a bunch of different brands there. The zinc is a small arm-based processor with FPGA logic gates, and there's the vertex and Versal and context various work various devices for your different workloads and And so in the architecture of these devices So if we start on the left-hand side on the CPU we call that Zen so ZDN or ZEN depends if you're from Canada or Then on the accelerator phase we have in the Radeon side It's our DNA and on the instinct side is called cDNA and so that was for Radeon Versus compute as a DNA of the architecture So they have different properties a little bit in terms of how they've been optimized for the hardware and then on the adaptive Computing is called xDNA and so we'll see that as we come through a couple of the other slides So let's talk a little bit about PyTorch and AMD catching the bus so When we're talking earlier like when did PyTorch first start? I didn't start in 2016 2017 I was at AMD and we're looking at all these different frameworks that are available there. I think we're seven or eight on my little roadmap and You know they consolidated but PyTorch has been there for quite a while. So we had this beta in 2017 Did some porting of the cafe to hip cafe and the hip is the programming language That's very similar to CUDA so if your experience with CUDA looks the same similar API and We created a tool to call it hipify to convert CUDA code to hip That's what we did with cafe and this was the first project to sort of to use that tool and it became part of the Compiled path and so then I was here as we worked through this we kept that tool updated So as we're new APIs and implemented It would automatically convert and actually that's still the way it works today Is that the whole code base is still CUDA and as you compile it? It targets the AMD device with the hip API calls But as you can see in this phase between 2018 and 2021 We were catching the bus and this is where you know we spent time on CI So we set up servers so that people could run pull requests they would actually run an AMD hardware and Really getting to the point where we could have front page support and then finally this year where I would say we're a day Zero support on a new release so it's a really great milestone to see because you know trying to maintain your own fork It's not a winning battle So to run code today, it's very straightforward You can either get a container or you install the Rockham driver and then you just install the pip wheel from pytorch.org So you go through the little selection box copy and paste the code in and you're up and running with a System on or hardware and if you've already written an application using pytorch You don't actually have to change any of the code you you actually leave where it says device equals CUDA if torch CUDA You leave that code there. It works and it uses the AMD hardware So we have support for the nightly builds. That's where a lot of the development happens. I invite you to check it out there So a little bit more detail on Things that are happening behind the scenes I Mentioned that we were converting the code so it's using hippify as the tool But you can actually still go and find out if the device is a hip device And so there's a little bit of code at the bottom there to say is rock and pytorch Check the version dot hip and how we do some of this work in the background is with Libraries, of course, there's lots of common math and communication libraries That help accelerate the workloads and these are integrated in to either pytorch and or other projects Some of them are more focused for HPC, but there's a lot that are interesting for the The machine learning space and Rickle is a Collective communication library that actually uses the same API as nickel So it actually doesn't do the hip conversion It's the same API and then it's the AMD implementation underneath to connect to our hardware the composable kernel one is interesting because it creates options for building up your fused kernels So if you're really spending a lot of time building up your own operators you can build fused kernels and Get very great performance through that So if you do want to build the pytorch code base There's a script included in the repository to do that And it's pretty straightforward and it works out of the box and then on the various back-end implementations There's a eager mode and with the new torch compile in pytorch 2.0 That that's available as well, and it uses the open AI Triton implementation We also have worked with the AI template library and so there's a composable kernel component that plugs into that and That's one of the methodologies. We've seen give the best performance for inference for the instinct GPUs And there's a nice blog post so when you get the slides you can just click on the link and view all the details there so that's the side of the Rockham on the Instinct or the cDNA and the rDNA type devices. So Next up is the Zen devices. So the this is the epic and The other CPU infrastructure devices So Zen DNN is very similar to one DNN as you can tell by the diagram it's mostly used for inference and We are working towards getting that upstreamed into the main pytorch repository as well so it is looks at the exact CPU codes and Create some optimized kernels for our hardware and then we also mentioned the xDNA. So this is on the FPGA side So there there's not a built-in path in pytorch But it can take pytorch models and convert them and then run an inference workload on most of those devices And I'll talk a little bit more at the end about how we're merging some of this work all together So in terms of the ecosystem it's really important to be able to change code and see what's going Happening all the way from the application layer down to the device driver and we've open sourced our full stack and so you can Go and actually rebuild the kernel driver if you find you need some tweak or something needs to be modified at that layer You can tell that there's a few different licenses that are required for the different parts of the stack That's really due to the heritage of them like the the gdb Debugger is still a gpl license because of the history of that But the advantage is is that since we're upstreaming that code into gdb You can use your standard gdb commands to do debugging And we really wanted to work with the community. So all this code is posted up on github We're Let's say it's been a struggle to maintain all the requests But we're getting better at monitoring the github library components for forum like input pull requests and Actually tracking components there So one of the other Interesting tools is the kanido profiler. So this uses the core rock prof component with rock tracer as Ways to abstract the information from the gpu and then it plugs right into tensor board So you can use the tools that you're familiar with today and Get the performance perspective of what's happening in the kernel. You can see that memory trans memory Changes from the cpu to the gpu or from The different times that the kernel components take On the ecosystem, there's quite a few libraries even within pytorch And as of the pytorch 1.12 release These four core components were all enabled with the rockham ecosystem So you have the text classification Some recommender systems the computer vision libraries As well as support for audio and signal processing On the sort of expansion side of working with pytorch is the onyx runtime. So we spent a lot of time supporting this infrastructure to Have I guess a good performance with our core libraries but also Upstreaming this into the onyx runtime project So for both inference and for training you can get pre-compiled components for the rockham system that the torch ORT is the python module that you use And it's pretty straightforward to plug it in and as you can see through the the architecture of how Onyx runtime is built it uses the execution provider And that execution provider is sort of a nice abstraction for the different hardware implementations And you can see there's quite a few available for different hardware devices in the market And i've highlighted in purple the ones for amd. So you have the standard cpu components you have The mi graphics and the rockham implementations as well as the vitis from the xilinx FPGA support So then another interesting project is deep speed So this gives you some great support for running those large language models on a reduced number of gpus so you have ways to Use a better memory optimization you can offload to cpu or you can even offload into disc And so there's a couple links there for getting the upstream Components or prepackaged binaries Then this is a topic I find pretty interesting This happening in this space is the concept of intermediate representation And working through these different layers to figure out. Okay, how can you make the hardware abstracted but still get very efficient kernels? And it's usually the way like as you abstract more you get less efficiency So there's always this trade-off between building pre-compiled libraries or doing something on the fly Or working at a very high level of the framework So we've been doing some work with triton the ir there as I mentioned with pytorch compile But the open xla with stable hlo in the i re It's it's also another methodology of using ml ir to Reduce those calls into a nice abstraction for hardware and then have That hardware support for different devices what this allows you to do is Jet create kernels for new hardware very quickly Or a different architecture It may not be the best performance, but it gives you that portability in speaking of performance With pytorch 2 we did a quick study on some of the core benchmarks included in There with the hugging face models and this shows a Nice boost in performance from on average about 1.5 times the performance going from pytorch eager to the pytorch compile mode Some showing much higher performance and again depends on the kernels It depends on the model and then the kernels that get generated And and I see this improving over time as well as people have become more aware of how to build those with ml ir and so For long term. This is where amd is looking to Put all of our hardware platforms together under one roof specifically for inference. We call it unified inference front end And it's available today and we keep adding more devices under the structure We also plan to Well, it's it's available through the inference server. So if you are running it Something that you have a whole suite of models already developed and deployed You can run an inference server. It's standard type of json interface with An api that you can get the components and run it on the different devices We have pre-trained and then pre-optimized models for all the different hardware platforms and we'll expand that over time This is supporting many different frameworks, but As you can see, there's sort of three core stacks for the three types of hardware architectures and we also Are looking at how we can optimize that so it's just less effort to migrate from one device to another and That's all I had for today Open for questions. I don't think any of it's intrinsic. It's more just Looking at it to expose hardware features So one that we've spent time on is in the hardware we have matrix math operations and making sure that the upper layers can see that those exist and know that they can Generate code that will then make use of them So it's all about exposing it to the right layer and then making sure that those layers can create the code that's optimized So I don't see anything limiting. It's just a case of Yeah, then spending time on the on the intermediate layer Any other questions? Is anyone used a name the hardware device? I got a few nice Um, maybe I showed it to the hugging face side of things too is that I know We have a lot of people have tried just the standard like any model that's there on pytorch And they've actually just run it out of the box So, you know, it just does a testament of the whole ecosystem is working. It's nice to see And and if you don't if you find something that doesn't work file a bug and let us know All right. Well, thank you for your time


Hello everyone, sit tight as we get going here. If you are not watching this live, make sure you check the description below for time codes to skip around the video. They do tend to be about two hours or so. We'll see how this this one goes. I don't have a whole lot to talk about, so it might be a bit quicker today. But yeah, we'll get going in just a few minutes after we make sure that everything is going and and we do some hellos. So I will pause the playbacks that I've got going. Let me know that you can hear me. I'm Ostafa. Hey, Mr. Certainly. Unexpected makers up early. So sorry in advance for the chats. I know they're gonna be small today. They're gonna be small on the stream. I Yeah, the camera angle slightly different as well. Good eye unexpected maker. I'm sitting a little further back because I now have Actually, I can use cat cam to show you my my current setup. I don't know where those spooks under the chair anyway. So there's the kitty. So what I have here is now I have these Like tripod mounts so the C-clamp to like a little tripod arm on the my keyboard. So I'm sitting back further which means that I moved my monitor forwards, which meant that I had to adjust to where my camera was. That's why it's a little different. And I Hey Paul. Hey Brian. Hey David. Yeah, I got this idea from the the model 100 Kickstarter, which is the newer version of this keyboard. Somebody had that there. I'm kind of small on the side, aren't I? So I've been messing I was the reason I started like a little later than I normally do is I was messing with OBS Because I installed the version with the browser source. So the chats on this side are Was I putting the chats on the other side before? I was wasn't I? I totally was. Okay, that explains why that's over there. So let's just do some rearranging while we're at it because I remember I put it like this so that it was small. So I just discovered if I hold alt it allows me to clip and And I haven't figured out how to make it bigger. So I'm sorry about that in the first place, but So if I hold alt I can clip it down There we go, that's better I Remember I had it. Yeah, I had it set up so that when I'm Reading the chat on my monitor it makes me look like I'm looking at the chat there, too I haven't figured out If anybody knows in the in OBS with the browser source how you Ooh, there you go Clamps and magic arms. I love the factory. Thanks for the link. Mr. Certainly. That's exactly what I was modeling and after If you know how to do like the control plus to make the font size bigger in the browser Source in OBS, let me know. That's what I need to know That's why the text is so small and I don't know if you can see it But Yeah, it's not that bad if you have it big It's gonna be bad on but on small screens, but we'll deal I'll see if I can't figure it out Most office from Iran and it's night now. Yeah, time zones are wild. Thanks for joining in Thanks for Joining us Let's kick this thing off. Shall we? Unexpected maker says you can't I don't think it's really poorly supported. Yeah, the interact thing doesn't Mr. Certainly says it's legible on a 24 inch screen with two-thirds of the window. Yeah, I Do like it a little bit bigger. We'll see one thing the browser source does allow is it Control scroll wheel. I can try that Sorry, we'll get we'll get going in just a second here Control scroll wheel. I have it set up weird It doesn't seem to work one thing you can do is you can change this the CSS oh from the forums Yeah, let's see Whatever we could just do Is that for discord or for YouTube? So this is for discord that I'm And of course it makes me go You choose the render size and the options and then scale it with usual scaling I know but like that means that I would be scaling pixels bigger. I'm kind of like I Prefer it if I could render it bigger That might be for YouTube. I'll keep playing with this. I don't need to do this on the stream It's it's okay enough. All right, like It's not the end of the world Simon says hey Scott from the UK house Seattle. It's pretty good pretty nice day out not super hot Went to the Oregon coast on Monday and Tuesday, so I actually had like a two-day week But I guess we'll get into that in just a bit. Let me let me do housekeeping and then we can start chatting so David at 715 timecode. Hello everyone. My name is Scott I work for Adafruit on circuit Python Adafruit is an open-source hardware and software company based out of New York City I work remotely for them. So I'm in Seattle here Which is why you'll see times in Pacific because that's that's the time zone that I'm in This circuit Python is a beginner friendly version of Python designed for microcontrollers, which are little inexpensive computers You can get them for like five between anywhere from five and like a hundred dollars Most of the ones are tend to be about 20 or 30 dollars So that's that's briefly what circuit Python is. This is a deep dive So it's a chance to ask me questions. I'll go over some of the stuff that I've been working on And we'll just have a good casual time and talk about circuit Python and other random stuff so if you want to support me and I'm or These deep dives happen every week at 2 p.m. Pacific on Fridays next week looks like it will be on Friday as well Typically they're two hours or more. That's why they're totally casual If you want to support me you can go to Adafruit comm purchase something there I don't think we have any hot-ticket items going into the store today, but any purchases are welcome And they are I'm paid by Adafruit to do these streams along with all the development I do If you'd like to chat with me and a bunch of others check out the discord server the Adafruit discord server by going to the URL adafru.it slash discord That's what the That's what the gray box here is And last piece how it's keeping before we get into some stuff the kitty in the Kind of shade here. His name is spook. He is epileptic, but he's been doing really well Just it's just a heads up in case he does have a seizure which he did early on in the stream But hasn't recently so he's been doing really good I'll just like take my headphones off mute everything and just keep an eye on him until he's done So that's the housekeeping I got one question from Fed A2 says what would be the most expensive Circuit Python board the TI calculator. Maybe the Sony one. Yeah, I don't know how much they run for There's also This presence is kind of pricey And we do run on some We do on run on some dev boards that might be a little bit pricier as well Yeah, I don't actually know Like I don't think anything Adafruit does is over a hundred dollars Yeah, generally not not too much And thank you to Thank you to David in advance DCD for doing the time codes. It's really yeah, maybe the CubeSat And that would be a good one. I think we have more than one satellite actually But yeah, I know that At least the Cube some of the versions of the CubeSat have M-RAM magnetic RAM Is that what it is on them and that stuff is pretty pricey just on its own But it's radiation It's better for radiation environments. That's why That's why it's worth it for a satellite. All right. Well, if you have more questions, feel free to ask them Kind of where I'm at is This week has been kind of a blur, right? So Oh and Unexpected maker is offering to make a $500 circuit Python board for anyone who wants to pay a lot for a circuit Python board And DCD points out that there is the USB hub from crowd supply from Capable robotics that is more expensive and it's a USB hub as well Not really a dev board though Yeah, so I streamed last week and then I took Monday Tuesday and both like pretty much all a Wednesday off Because we went and did the Oregon coast which is like a state next to Washington It's about a four-hour drive and it's the Pacific coast of Oregon so That's what I was doing for those of you who don't know exactly what it is and So I only had like basically like I had to do email catch up And so I basically had two days of work this week. So not a lot to report. Well, oh Perfect. Yes. I do have some questions that we'll do But Besides that, well, we'll see what we end up doing So, yeah, okay, so Jason Rahm is here, which is great asked me a question on Twitter and we'll cover that in just a bit But I did see one other question come in before that. So let's do that one first From LinkedIn Joshua Gold asks Does the circuit Python slow down the microcontroller in any significant amount versus C or C++? Especially with video processing So circuit Python does slow down the microcontroller whether it's significant enough or not is dependent on what you're doing Circuit Python itself does not do any video processing right now. So it's not really relevant But in C Python land on a Raspberry Pi like Generally what you'll be using is a C library that does any sort of processing that you want So in general, it doesn't actually slow it down that much Because Python can use C to do the things that it needs to do All right Hopefully that answers your question Joshua. Thanks for asking it and Thanks for dropping by we're also on YouTube and Twitch and LinkedIn or kind of the places that we're streaming. So let's Talk about Jason's Jason's question Jason added me on Twitter and said hey look I'm looking at this pinout Let me switch to the desktop I'm looking at this pinout here and Can you explain to me what everything means what the nomenclature on this is? So I don't know why it does that weird Scaling thing, but it must be my graphics card So what I did is I linked them to this page here that has all of the explanation for everything But I thought what we would do and what I offered over Twitter is just take a look at this and go into more Detail about like what every little thing means. I thought that'd be really useful. I think it's it's a great request So let's just pull up this and I will actually drop this in the Notes as well and if folks want to follow along I'll drop the link in the Chats as well Okay, so what do we have here? This is a really common thing Pinout diagrams are very common in development boards. What they're what they're geared towards is they're geared to show you The capabilities of all the different pins Does Adafruit do mask giveaways still Not sure what you mean my mask giveaways Is there a typo in there Making that make less sense So pinout diagrams are all what they're meant to explain to you is like Here's the places that you can connect to a board and here are all the things that you can do with it So let's kind of just go Ah mask giveaways, okay, right No orders do not include masks. Yeah, okay So this is for the circuit playground express And now here what we have is these are IO so these are internal These are internal things. These are not things that go out on the pad But maybe this makes it a little bit easier and maybe I will even just make it giant so These are these are things that are connected to Pts is hi everyone There's two people that can chat as Adafruit in YouTube or more So let's just go by column so the reason that that there's multiple columns here is because It's because uh individual pins on the microcontroller. So what I mean by that is So the microcontroller on the circuit playground is this box here And each of these little gray things is a pin And uh And what this is largely documenting is what each of these individual little pins can do Um, so if we go here and look at IO this first column, I believe is just the the numbering from The numbering that you use in Arduino So if you're doing like a digital input digital output or whatever it's called an Arduino I think this first number here is the number that you would use in Arduino Um, so this is a mix of like how you would refer to it and what it can do So the second column here these pbs and these pa's and the numbers um Are are the microcontroller. So if you looked at the microcontrollers data sheet Those are the names that they would reference the individual pins by Um, and it's important to note that the names are not necessarily Numbers like pin position um So You might see like a pa 30 on a device. That's only 24 pins So the pa the pa is like port a So if you Like want to address a certain set of pins from the gpio perspective You would have them like all in one 32 bit word if they're on the same port generally So the that's what the p the a bit is and then you would b c d e different ports And then the numbers after that are like the position in that 32 bits And you have control registers that like because the the output pins can do multiple things You'll have control registers that say like oh for pa 8 or pa 9 like let's connect it to this internal function Um, and that's kind of what the rest of this is showing so um These uh kind of golden boxes these e int 7 to 9 11. Those are external interrupts So this is a function. This is functionality in a microcontroller that allows um you to take in a level of an external signal and um Interrupt the cpu so inner as the cpu interrupt means it basically like stops what it's doing Saves its state and then starts doing some other function Based on that Hello, minnesota mentat and g3 holiday. I don't think I said how do you either So that's what e int is and then the number after this is the um position I think Like which bit in Typically I think on this handy. It's like 16 different interrupt lines. Um, and so that's what the number is Um, okay, so for here um DAC DAC is a digital audio converter So this means that it's an output um and There there's an output and then I think these here are I'm actually not sure what this number is The a's are typically these a zeroes and stuff are typically what we refer to them in circuit python as um But I'm not it does this diagram tell us. Oh, yeah, so here we have um The physical pin. Okay, so I was wrong. This first column is the physical pin. So that's the position um It's DAC is digital to analog um Digital to analog. I think hi carlos Yeah, and then the the purple and green things are uh Our ide which I assume is um Arduino names like dishipu was saying um Yeah, so port pin is the name This is the name of of it that you would see in the See in the datasheet and then yeah, the gold is interrupt Um, so if we're just going through this a little bit more so we did the ants this i squared c here Um is pretty vague and I don't know exactly why um Oh, did I say digital audio? Sorry. It's commonly used for audio um, okay, so i2s here i2s is a digital audio format um And so this is just telling you like mc is master clock D1 is data sck is clock usually So that's specific to the i2s standard um This ship is says in circuit python the green ones are usually d number and then the purple ones are usually a number Right, so that's what these are so these lighter green a n's those are Those are the analog input so there's a When you have your analog to digital converter You have different inputs that you can connect to that analog input system And so that's what these numbers are the a n's are like which number that pin matches into the analog stuff um That's what a n is so these s uh two colon three and s two colon one um What these are is these are terminology. This is terminology specific to um the samd series they have this uh thing called a uh sr com which is a serial communication peripheral so there's this other piece of hardware into it with its um Other piece of hardware within the system on a chip that can do serial communications And that basically encompasses uart i2c and spy And so the the first number i assume is the instance so circum two and then the second number Is what's called the pad number um and depending on whether you're doing i2c You are or spy like the pad number can do certain things Really you don't need to like this stuff is really detailed and especially in circuit python you don't need to know all of this Um what you can do in circuit python is you can just try to create a uart and it will tell you if it works or not um So Sof i don't know what sof means um Okay, css seems to work for youtube chat. Oh nice I will have to Let me just try it I'll take a break from this So jason let me know If that is making sense Aha Thank you that looks better um Okay, what else have we covered so that's these internal things And yeah, so for circuit python generally you don't need to know this stuff um Because circuit python will just tell you whether it works or not. It will try it it works in all combinations um Arduino has like some more limited stuff. So let's just take a glance most of this is the same Um, so let's just take a look at this further. So total current of each port should not exceed 65 milliamps Um, so yeah, you don't want to drain a lot of stuff um Micro type b so these three pan these are uh pads on the back And the thing that's most useful about them is like their reset line And then also sw clock and sw dio Um, those are debug things. So these are they're they're exposed on the back because when they test it They press it down on pins that like loads the first version of all the code over those debug um Yeah, that's a good point s o f is start a frame for i2s maybe Yeah, that sounds plausible um Okay, so 26 we have a light bulb which must mean it's an led we talked about this other stuff 3v3 is 3.3 volt power Um touch so there's only certain pins that can do uh native touch support So that's what they're designated for Here's the power constraints more touch another DAC pin So the samd This is the samd 21 um Yeah, and it's actually the same pin. So if we look here speaker pao 2 and then you can see pao 2 here It only has one DAC pin. So I was gonna be kind of blown blown away by that um So here we have extra designations for rx and tx and those are just common designations for uart Um, it's the same data that's kind of encompassed in this vague s It's just being more explicit that like those work for uart connectivity um Yeah, I think that's about it I think that's about it. There are these like color designations here and that says port power group. So those are the pa and pb um But yeah, I think that's I think we covered it all um Awesome unexpected maker snag that css as well um Okay, let's we got some questions here Um carlos made an awesome microbit game. That's awesome jason says that's helpful great Okay, unexpected maker says Out of curiosity, is there a way to change io that has specific functions? Like using a crossbar bar or iomux in the sandy outside of bootloader settings um, I'm not exactly sure what you mean Because all of the iomux stuff in circuit python is done automatically um The one thing that you can't change is like if you have a spy flash connected to it But um circuit python is meant to be dynamic. So it should be able to switch different things Um, maybe you want to clarify unexpected maker Was the content one was supposed to work on the discord screen because I don't think it did I usually do 150 but 140 looks pretty good too looks a lot tighter after having it small Okay, so that is a go over of this pinout thing Um, we do have a new system for pinouts. This is kind of an old it's 2017 um Sorry, so to assign pin functions like move hardware i squared c to other pins than set up in the bootloader So we don't care what the bootloader does in circuit python Um, you might be confusing it with arduino arduino I think tends to have like a designated i squared c in a desi or and then maybe like a designated secondary i squared c But in circuit python, you can do as many as you want as long as they don't conflict with each other So you could theoretically have like five On samd you could have like five hardware i squared c's Um bus io like does all this logic for you Like if we dive deep into the code here So here's the circuit python source and uh the place to look is ports samd since we're talking about samd um common how bus io i squared c dot c um So what you'll see here is here's construct So it takes a a pin object for scl and a pin object for sda And then it calls to this i squared c get circum um And if it can't find one then it says invalid pins So here you here we can see what it's doing. So it's taking um scl and sda and then it's producing the circum and the pin muck settings So it's just going over the number of circums per pin um If it has uh So I think that's typically two so that think of this is this is the number two So it checks the first circum on the sda pin And then it sees so it uses the state of the peripheral itself the enable bit to know whether it's already in use um If it's not in use And this is the pad check as well um So so this will fail if the circum that we're checking is already in use or if the pad match Doesn't match what we need for sda And then secondarily what we'll do is we'll pick the pin mucks depending on whether it's um Like index i is zero or one and then what we do is we check the Second pin the scl pin that you're given and see if it has the correct pad Um, we already know the circums are the same. So we're checking to see if like it's the same Either like there's two circums connected to a particular pin So we see if any of them match the same index and then also we checked that the pad is the same And we set the pin box for that second uh pin and then we return um So yeah, we do it all dynamically um And that's true for basically all the stuff that we do Um, there's different ways that we do this internally But um, we try to like the idea with circuit python is you just give the pins you want and then and then we We try our best to make it work Um, unexpected maker says right. So I thought that That I thought that was something set in the boot loader for sandy that was fixed once booted But obviously no boot loader for circuit python. So yes, that would only apply to arduino makes sense um So Right, so so circuit python does have a boot loader, but we don't preserve any of this state of it Right, like we typically use the uf2 boot loader before circuit python um But yeah, we're and and this the This is kind of one of the core reasons that circuit python can't rely on a lot of existing embedded code It's because even projects like zephyr like what they'll do is they'll have a A macro or a define in sea land that will just say like this is the pin i'm going to use and compile it down Just like our dado does Um, whereas in circuit python, we don't do that. We we try to be as dynamic as we can Um, which is pretty neat and I think it's pretty powerful. Um, you can even look if we look at, um I think it's in the circuit python essentials guide I think in the circuit python essentials guide if you do like circuit python i squared c Um, it tells you how to wire it And an example case But there's this section. Where is my i squared c? And uh, it will actually try all the combinations of all the pins that are broken out. Um So it does that by just uh, it tries to Tries to do bus i o the i squared c and if it doesn't work it just de-nits it Or if it does work it de-nits it so Um, it can get you this listing of like here's all of the combinations of of pins that you could use for i squared c And there are equivalents for u arts as well um Welcome Carl Carlos Armando and angry cub to the discord Beata says, oh right. I was wondering about naming conventions regarding stemma i squared c Did I cover what you're talking what you're referring to? Or are you asking me about naming conventions? Ooh, I can add dark theme for you're talking about for youtube Oh, okay. Let me pull that up beata Um Boom now we have dark youtube. Thank you Um, okay. Let's pull up this bug that beata is talking about 46 38 What i'm gonna do is i'm just gonna click this and then change the number Add stemma i squared z singleton on boards with stemma connectors We can add a stemma i squared c singleton analogous to board i squared c to designate the i squared c bus attached to the stemma connector um We will call it stemma i squared c instead of stemma qt i squared c because some older boards have the larger non qt version So would you like me to give you tips on how to implement this? Is that what you're suggesting? Um, so the question the related question is how does board i squared c work? Yeah, um Carlos Armando the uh a great place to share uh microbit games would be like the show and tell channel in particular Um to show off what you've done. I don't know if we have a microbit channel. I don't think we do So, okay, so relatedly to this i squared c stuff. Um Neurodox says I made a branch for adding stemma i squared c But I don't want to pr it until seven is stable There is only one board that needs it anyways just an alias on every other one Are there reasons to prefer one name over the other? Uh I guess I would say One thing to think about is Tab completion. So if you did i squared c underscore stemma, you would be able to tab complete um if you do like If you did like board dot i2 tab you would get both, right? um, whereas if you If you didn't then then it you wouldn't get both so, I mean Carlo, I don't want Stuff shared privately with me You gotta share with the group or not at all well or not with me private stuff should only be for like private things, um Don't DM me Okay, so I think I covered that I think I made a point. Um Christian says let's talk about that bug report you opened first two Uh, what bug report? I opened lots of bug reports What is the oldest one we have now? I guess I could make sure that help test cutting edge builds Breakpoints is the we still don't do that. We don't do that We don't do that ability to redirect replout but Oh, yeah Let's consider it for 40 after three hours already Uh, the one by this ship about the flickering pew pew display Uh, Dan Dan's been working on the display issues I don't have a whole lot of context. We can pull it up I think this is the one you're talking about What I usually do is I categorize them So it's display IO and it's on a pew pew, which is a sandy and seven So keeping them in mechanic frames I think we're seeing this on 80 fruit boards as well. Oh, it's not display. Oh, it's matrix driven by the pew library so How similar of a matrix is that to the micro bit? Because I was just thinking about Maybe it's time. We actually have a Native Native driver for that Because with the micro bit like I probably want to like do some stuff on it from the internals I can see the display flicker with my eyes even was stable. I thought it might have been the charge pump Yeah, I would be open to doing a display Thing especially because I think it would apply to the matrix as well or to the micro bit as well Um, okay, I will remove This display IO Yeah, I haven't looked into it too much, but I it's been yeah The micro bit's kind of a weird weird thing Yeah, the micro bit has a five by five display, but the circuit playground has 10 LEDs Yeah, we're not talking about the circuit playground though. I'll show you what we're talking about We're talking about the pew pew So if you go here and type pew Uh talking about this So this is a lot similar. It's actually more it's going to be more pixels than what the micro bit has But it it's going to be connected in a similar way Uh, so yeah, it's going to be it's going to be more similar All right, uh Somebody just pinged me on the mods channel, but I cannot see it. So totally different display. I yeah Sorry, I don't Yeah, so it's not what dan's looking at dan's looking at some OLED stuff. Okay. Thanks, mr. Certainly Our mods and discord are great. Thank you mods Including mr. Certainly um Yeah, I don't know Sorry, I don't even I think I do have one of these Let me read let me read that I won't be able to look at it, but Maybe I can give some First impressions Where did it go? Because I read it off as dan would do Clitchy display random bright lines Display is very stable He's got a bad cough Oh, it looks like citrus Okay, so that's what it looked like About something disabling interrupts I mean, I think generally like Maybe what I would do is um put uh Like use a logic analyzer and when Interrupts get disabled and disabled enabled and disabled set a line high and then use a logic analyzer to see how often that happens um That'll at least confirm that that's your problem and then figuring out like What's the source of that? Uh would be kind of a separate Separate thing Yeah, so that's probably what I would do to interesting speed has been too Get bisect will get you there Yeah, yeah, just figure out like where it's gotten worse Katia wants to play I know right Okay, um Yeah, sorry. I Like the sandy stuff hasn't changed a lot um In terms of execution speed I don't know I you're following all the changes that we're doing um Yeah, it's just one of those things where it's like you could put effort in to make it faster and And you'll be able to make it faster. It just takes a lot of time Um, okay, so let's uh If folks have questions feel free to drop them in the chat and I'll answer them um I'll try to answer them but maybe I Let me update on the on the Microbit first So that's where we left off last time and that's something I could work on but I don't think it's that interesting um, so What I have here, I'm just going to use this to do it spooks in his bed now Here I have my microbit Just a product showcase mode And I'm going to plug it in and what you should see is there's actually an led or about here for the microphone That I have co-opted So that's circuit python starting up on the microbit and then It should be discoverable now So I've made progress. I had to figure a couple things out um One of the things that I had to figure out was that um It didn't have The oh come on. I don't know how to use android. So here's android and there's serpi So I will hit connect and it found it and then I can do UART service I think I can So now I should be getting stuff And if I write you can't quite it's kind of hard to see But um under this tx characteristic you can see the value l o So that's the like last line that was sent for the serial connection revealing So bluetooth is working But obviously we don't have a great Great way to see everything If you want to follow along with this microbit stuff, this is the first build that um First build is circuit python that doesn't have usb And you can see my monitor now that i'm in well in product showcase mode because It clips it a little bit when I'm doing that um So one thing I had to figure out was that um you couldn't Uh, it was trying to start up a low frequency oscillator that the board doesn't have So the flashing that it does right at the start was like super slow and I was like this is wrong Um, and I was debugging it. So when I was debugging it I was also noticing it was like in that weight for the oscillator to get going So I just turned it off and it seems to be going well now. So which is awesome um and then Uh, the second thing I had to figure out was that um When you drag a hex over it erases the entire nrf, which is going to be really really unfortunate for preserving like your file system um But what it meant was like I couldn't drag like the soft device that is like the blob that That we get from Nordic for BLE and then drag circuit python I had to actually merge the two things and then drag the the whole hex file over So that's kind of like the last things I had to do before making a pull request is like I've got a well, I've got to do the The pin naming which we started last week and I just haven't finished and then I've got to figure out how to have like a type of of artifact for circuit python that is like The merge of these two hex files the soft device and circuit python and then um Make sure that that ends up on like circuit python.org um, so that's Progress on the micro bit which led me to this thing of like obviously like connecting to the serial is not really um a thing So what I was actually working on is uh Is working on The code dot circuit python.org. So if you just go I showed this last week as well But if you do code dot circuit python.org You get this like terribly formatted. Um But like is getting all the functionality. Oh, you can't see that um Terribly formatted but getting all the functionality of uh, the web bluetooth stuff going Um now this this won't work on well, this is firefox. So this will definitely not work. Um But I also have chrome up here and I haven't gotten the web bluetooth stuff working from linux on chrome Um, but here you can see that I now have a serial spot as well um So this is what I thought I'd work on just because I was starting to work on it. Um before um is adding serial support into this web uh This web page that will be code dot circuit python.org and um also trying web serial which is a uh Is a usb serial sort of communication thing as well And that reminds me as well Also that I was trying to get the the pass through serial stuff working on the micro bit But I wasn't able to do that So that was a little frustrating But yeah, so let's take a look at um I want to just work on this stuff because I just I just got it working So here you can see like I can't type into it. All right, let's get this going I am not I am definitely not a uh web developer By any stretch of a of the imagination Hey, johnny, it's not letting me type Just not good It did manage to print which is good. So let's open Developer tools and see where we're at So it should it's like detecting That we're there, but it's not actually typing anything in Which I wonder why? Oh, I guess I should also plug that. Um, I was on a podcast yesterday with Damian Who's the creator of micro python and uh, it's talk python with me so, um youtube.com So here's the like Live recording of it. So if you missed it and want to get it before it's actually on the podcast Thank you. Thank you nair doc for linking to that Um And I'll put it in the discord chat as well So if you uh, I'll just plug that if you want to see uh the discussion we had I thought it was really good I'm sorry I'd recommend it I almost got it live Yeah, we had a good crowd. It was funny like, um, I have like 42 concurrent viewers on youtube right now And uh, we had like 16 maybe 20 and michael was saying that was like a lot for him So uh, check it out. He he records it live every week. Um, if you want to see more like c python-y stuff generally All right, let's see if we can't get this. Um Serial input working better So here's the source I'm using h term, which is a a google thing that does all the terminal stuff. So that makes it really easy Um So we did this install keyboard Hi, the art of dhg 79 Ha ha unexpected maker says it was all of us ossees making up the numbers it was So on vt keystroke Let's see what this does When the user pastes a string I'm like such a noob to javascript I want to get like all the pieces together and then have somebody who's actually good at javascript come along and make it pretty That's my goal Okay, resize 90 40 and then key So we are getting that but we're not um having it show up again so This is probably That we like generally I think what happens is that it gets round trip. So Um, when you press a key, we would send it to a device and then it would send us back that that same key um So I think what we want to do is what I was thinking is we could actually try to connect a web serial Um into all of this hodgepodge of stuff. Um, and then maybe we'd be able to do like, uh To a usb circuit python device. So Um, let's give that a shot Shall we? Um, so I think we're going to need a new button You need usb serial So that's going to make a new button. So we hit save You'll see so this is one thing I think people who are not in javascript world need to really appreciate um the tooling game of javascript folks is Like industry leading like it's really good. See like if I hit save here Like see the page is automatically refreshed like When when you're looking at places to to steal some ideas from From for a circuit python like things like this are Um, where to look like the javascript people are doing really really really cool things okay, so we call that request serial device and We have it Um, let's say if navigator Dot serial. I think that's what it is So if it's able to do that then we do, um We'll make an object request serial Add event listener click Oh, I'm just so bad at javascript Um, and I'm not used to ide's giving me braces. We'll just do on request Serial device button click a lot of this stuff I crit from other things Um else request serial Disable that's true. Okay, so we don't want to let you click it And see so I just hit save and it reran I'm not sure how you embed discord and obs, but you can try this for the font size So it's just the it's the um native It's the native app Um So I just like went to discord.com slash app and then logged in So let request serial equal document dot query selector Serial I think yep the web page. That's what I tried Okay, so now if we click request it's going to complain because the function doesn't exist So now we want a request bluetooth device button click equivalent This is just kind of gross gross gross gross Right Angry cap says in the real app you can command plus I I tried to do that I'm on Linux so it would be control, but I wasn't able to do it through the like interact thing in um in uh OBS requesting any serial device. Okay, so now what we have to do is we want to pull up the web serial API concepts and usage Look at they even have the micro bit as the example So it provides attributes and methods for finding and connecting the serial ports from a web page provides access to a single serial port The following example shows how to check for available ports and allows the users to grant it permissions to access additional ports If the site doesn't have access to any connected ports, it has to wait until it has user activation to proceed In this example use a click event handler on the button for this task Okay Reading data from a port So get ports says Of the serial interface Yeah So let's just see Let's on request serial devices. Let's await navigator serial Get devices and we'll just print Like theoretically you want to connect to an existing one I am using the OBS browser embed I just switched to it So here now if I do request serial device Get devices is not it's get ports Devices is not defined Okay, so it gave me a length of zero 90 a.m. Asks does Adafruit do regular code reviews or no? uh Generally yes In circuit python, we certainly do in circuit python All of the ci tests must pass which is basically just building every board And then you have to have one reviewer's approval um We're a little less strict when it comes to like all the libraries and stuff Um, it it'll vary a bit more there One thing I wanted to do is at least get us to a world where we're doing pull requests for everything Instead of pushing directly to the repo That allows you to run the continuous integration tests Even if it's just one person that does a pull request and then merges it once it passes That's still better than just pushing directly to the repo So that meant we didn't That's okay So now we need to so this is basically like the things you've already connected to And now we want to see Um, ah request port with a usb vendor id Well, that's no fun There's a typo Can we edit it want to fix a problem yourself? I'm not logged in I'm always kind of curious to find typos I'm curious to see how quickly typos get resolved fix typo So this is bad news for us. Um It's just a typo See it even knows Bye carlos Um, okay. I did my did my diligence. I love it. I love it when Things aren't github and you can just um, okay, so Do we have to provide Do we have to provide a filter? Because what we really want We don't want to we would want we don't want to limit based on usb stuff at all because There's like 200 plus circuit by thumb boards and we want to work with all of them um So I think we just need to try requests Navigator serial requests port Hey, yo Interesting. It does have names That's neat. So let's connect to that All right Well, we didn't print anything out um But we can say So many serials, I know right Let device equals that and console log device And I'm actually curious now whether it will um Yeah, so here we already have We're gonna have this serial port Again, so we could potentially have like a reconnect mode versus I'll like pick a different device mode Um Okay, so let's do that. So once we have a serial device, what do we do with it or a serial port? get info Open Set signals close Open with a bot right Get the readable stream and writeable stream. Oh interesting I wonder if readable stream or writeable stream would be like a good, um Interface for us to target for the beely side of things So that like we can just swap in between one and the other await read So I'm curious what this get info stuff is. So I think what we should be able to do is If we just click into here Get info I thought I knew how to call it All right, well just print it off if devices Equals one device is not defined. Oh, I always do that Huh Once again, it's just giving us usp product id and that are id Which is not enough Unfortunately, so a lot or or in circuit python 7 we're we're gonna allow you to have like multiple We're gonna allow you to have multiple serials from a single device um So I was hoping that this get info would actually have more info than just the product id and that are d um Which is unfortunate. I mean it'd be cool. Like this is enough to tell us what port it is But it's not really enough to tell us like which serials which Jason asks curious on a yes. No possible. Has anyone used a circuit python board to manage led strips? I have a couple guvvy RGB strips that have an iOS app, but would like to control them without the app Hmm. I've not heard of that um if Do you know how it connects from the iOS app to the rgb strips? Because if they're if it's bluetooth Which probably is it's bluetooth or wi-fi like You could probably figure out how to connect to it So I'm not entirely sure beally controlled Some primitives in python from mac but curious You should be able to do beally from a circuit python board like an nrf That should be possible Our api is not the greatest. I made it very declarative which throws people off And I it's I haven't Explained it very well either Okay, so we get info So this is the thing with async that I don't really get and maybe somebody knows is like Here they have this while readable loop Like where do I put that? Is it I guess I can put it in an asynchronous handler and then it just sits there um Like I could just do that on connect Um like open buffer size Right, so dcd asks so when you have n starting with two devices with the same vendor and product Do you have to interact with the device or does the user need to guess? Well, the other thing that we could look up is There is actually also a web usb spec Which I think would give us a lot more um It would give us more information Yeah, this is interesting. So this is the same guy that does the web bluetooth Uh stuff And this is oh it's updated User gestures such as touch or mouse click I think if we did web usb we would be able to get um Like more information through the usb descriptor stuff I should really reach out to this guy But yeah, I think the user basically has to guess unfortunately I mean, maybe what we could do is Try to guess the right one I'm not sure. I don't think at seven we're gonna default to having two so if if somebody You know, we could also I wonder if In the web serial api, can we give multiple options to filter? Like when we request a device like we could come up with a full list of like all boards that could be circuit python Because we I had all those like ttys things as well Um filters Right, so the the filter is just an unsigned integer. I'm not sure you can give it Oh, it's a list of filters Yeah, so theoretically we could um Provide a big long list of like all the better IDs that could be circuit python um at least to like Not have a bunch of spurious ones I don't know. I I can't I can't let myself get to wrap a hold on this um No one no one knows where I should put that while true loop I guess it's okay if it's just a callback that does Um, okay, so we have a device And let's see. How did I do it here? My circuit python or my javascript knowledge is not great like maybe we want to actually have this like switch to device But let's just have a switch to it's async function Switch to Serial I would guess the device gives you an event when it becomes readable, but I have no idea It does give you event an event when it's connected But I assume that's similar to open So we have this belee device state. Let's also add a serial device So we'll say switch to serial device and then serials Device is equal to device and that's where we'll connect So in serial connected He will say Switch to serial device and return Or if we have to request one switch to serial device here I don't know. This is all terrible code. Like I'm hoping somebody's better. We'll come along and make it better um Okay, so if we hit request device We get it there We're also printing the properties Stop doing that And in here, so if we're gonna switch to serial, you know what? Maybe we want if serial device If we already have one we want to Close I think closes the term you got javascript in my circuit python show Yes Yes Yes, you did um All right, so that'll close it if it's already a thing I think And then what we want to do is we want to open it This has been really interesting to do this um javascript stuff because uh, they're doing all this async await stuff and So it's been a good forcing function for me to kind of like See I think we might want to do this on connect and on disconnect first So let's do device dot add event listener on connect And i'm gonna pass it something Mr. Bond disconnect Oh Thank you angry cub Let's see what this is Close method. Oh, yeah, look at that Port is no longer required if you can be closed and these sorts of resources released Oh, a long message that will take a while Read until closed What is this release lock? Release lock Oh, yeah, read until closed Let's say async function serial on serial connected I think it usually ticks an event, but I think serial Disconnected I love printing. I think we need to do a bind here as well like I'm basically I'm kind of like copying I guess this does it internally out of that listener I do those binds console log Console log is so nice I don't bind it to device So what bind does is it makes the this Keyword Equivalent to that it's this is like self in python Okay, boom failed to execute open on serial port One argument required, but only zero presence. Okay, so let's look at open. I think we have to give it a Oh, you know, melissa is good at this stuff too. Well, let's say we're at the The esp loader thing All right, so we need to give it a bot rate is Totally unnecessary. Just don't do 2000. I think it's 2000. There's one bot rate that will trigger your Huh? It's not doing anything. No There's one bot rate that will trigger the bootloader Okay, if we add event listener, should it be listed here? Which is open return We're awaiting it I assumed that it would call connected It returns a promise Which the await should resolve Did I do that wrong? Where was I doing the binds? You know, I was doing the binds in This JavaScript library in a class. Yeah, let's not let's not do those binds. I bet that's what's messing us up Save that's right, right? Oh, there's no on Sounds like connect is connected for usb plug and unplug Oh, that could be it too How many reviewers do we have in circuit python? We only have a maybe Five or six that do reviews All right. Well, it looks like it's connected. So maybe let's try this reader stuff So Maybe we just do it here Device is readable We can get errors Ha Reader has been canceled. Let's just I'm gonna do that Like we want to read it indefinitely Do something with value See what that does So just not it's called device Reader is not defined that looks promising So, uh, what we have here is, uh I'm actually I have a a Particle set or particulate sensor Just on my desk because we It's the summer and we usually have smoke here, so Um, what you're seeing here is it's it's actually showing the stuff that's being printed out for the particle sensor stuff Um, so now the question is how do we get it into the terminal? But I mean that'll do won't complain about that Okay, so You need to Find Set up h term Push it feels like spaghetti code to me Um Which is fine. It's really early. So what we're gonna want here is we're gonna want this print So T Let's say let's make another terminal Equals t So Way up here. What's the difference between var and let people know? I've just been using them both So now in here what we can do is we can do terminal Dot i o dot print But then when we do print what we have to do is we need a text ink Encoder decoder Um Each term actually I think I have it not here Down here Here we go We can't see most of your code behind it behind because it's cut behind the chat. Sorry about that Uh scoping rules. The main difference is scoping rules. Variables declared by var keyword or scope to the immediate function body While let variables are scoped to the immediate enclosing block denoted by braces Called block scope Thanks patrick Um, sorry about not being able to see my code. So I just copied it Um, and I was gonna do a terminal Terminal print, but I needed a text Decoder encoding each term to app at each term um When passing data to each render string should be utf 16 encoded Print Write utf 16 print lin write utf 16 as well as interpret um So I think what we want is I think that's what a text decoder does So Decoder equals new text Decoder, I think what we do is we just do Decoder dot decode So request device opened. Hey look at that It's alive And this is why I said j s is designed to make me feel bad about myself way too many things ways to do things Yeah I mean I get it from the perspective of like we we want to be able to Like we want to be able to like change the way things work over time But we don't want to have to like move people off the old thing And I assume that's kind of why it's like that All right. Well, we got that working Um Oh, and james answered on linkedin as well. Thank you james Let is scope local var is global All right, so we can request the serial device now, which probably means we don't need to Have all of this um console logging It's like dad, what are you doing dropping stuff? That's what I'm doing Um, cool. So we have serial output. Um, but I can't Click into it and like control c control c control c Uh, it doesn't do anything So now the question is how do we connect it back the other direction? And so let's comment this out. We're not going to be done um So what we need now is we have this serial device global So we're going to want to encode into that so Let's do on key Um key is a String So we want to if Serial device if we don't have a serial device we don't care and Serial device writeable Then we do serial device dot write Thanks angry cub Okay Oh, and we reading data from the port writing to it Writeable dot get writer new text encoder Writeable dot get Sorry Oh, it's great. I'll just copy all this Ha, that's simplest, right? We should probably make a function for this because Send string is going to want to do this same thing or we could just copy and be bad. Okay And let's be bad about it. This is This is why you should test before you copy and paste James says I like to prototype in node red workflow ish But can inject javascript in the workflow works great with home assistant too The custom web page is a must if you want a web page Yeah, we do want a web page. We're trying to be trying to make code.circuitbython.org um At least set the basics expected reserved word unexpected reserved word At 346 I don't see any reason Does that make sense to anyone? It's a syntax error Bio is saved We have the right number of parentheses I don't know Is that The wrong hand People are typing It's in there because it Went down to this line Is there really no way to test the code syntax without loading it into a browser? I don't think so Where did I copy that code from? from here 459 is the same copy You could test on the browser repel The other thing I'm thinking is if I just comment out like portions of this What if I do those last two lines? p59 So that is okay And this await Uh When the awaits there It has a problem unexpected reserved word I wonder if it's the str Like it's kind of silly to call it str Like in python that would be unhappy Unexpected reserved word. Oh, you know, I wonder if it's Uh, I think this is what it is we're not this function is not asynchronous It is That was the problem You have to say you're in an async function before you can do a wait So we're still going But what happens if I do control c? Oh, look at that It is javascript with semicolons. Should I not be doing semicolons? I got some python in your javascript I want to see party popper emoji Oh That worked I'm like all about like Using emoji as variable names Agricup I got back from a social false alarm just in time to see the magic Awesome. Well, thank you for the help Um Aaron says you haven't specified the async function Lost connectivity totally delayed my previous message. You were right on I built a console key logger. I did didn't I I should turn that off It's only when there's focus on it, I think So I'm curious Let's connect back up and control d I'm curious to see what happens when I pull it Dom exception the device has been lost We didn't get the disconnect event, but we did right. I think then we would have to say request device again And it's back The other thing that I was thinking would be cool is to have um And you can scroll back and stuff too I was thinking it would be neat To have some like connectivity messages go in there as well Um, okay, so now this This page is definitely a mishmash So I can do web serial It can't do bluetooth serial It can do bluetooth files, but I can't do Web files like local files But yeah, I think it looks cool and we tested that we can write to it Um, so maybe what I'll do is I'll just like coat up high so terrible right now that I think I'll just check it all in And be okay with how terrible it is Is this the time where I need to order a micro bit v2? You don't necessarily need a micro bit v2 Um anything with an nrf is fine Um like this serial web serial stuff is working with a feather nrf feather Okay, I'm just gonna add all this stuff Even though htermjs is from the other thing I see a github pull in my life soon angry cub if you want to help me that would be so welcome Um, because clearly I'm a little out of my depth But Now you need to write an hgtp server and sacrifice on via the web repl and connect it to another tab I'm open to suggestions for how to do this workflow stuff over wi-fi Um I think bluetooth is more interesting Yeah, we could yeah before we commit it we can make it taller. I just like All of this layout stuff is is tbd And I want to make sure that it's not soup so tall that it's a pain on I'll double it I don't want it so tall that it's going to be a pain on mobile Oops It insists on opening it in firefox, which is not Now that has that that's a bit bigger Change your s back to string Was it not working? I mean, it's all terrible code I think it works just fine Like I changed all the s's With wi-fi isn't that a normal web repl? Yeah Yeah, that's one option It's just to do the standard web repl stuff Um Much better Yeah, thanks for the suggestion. Okay, let's um get this committed And that will automatically push it to code.circuitbython.org Web serial All right, I'm gonna have to wrap up. We're gonna get out of here. We're going Uh camping this weekend as well So that has been pushed and um If you look on github, if you want to check it out, let me advertise this before we go It's at github.com.circuitbython slash web-editor Um, you can see that it was just pushed 30 seconds ago Ryan says I think wi-fi provisioned over bly would be the best of both worlds Yeah Oh interesting james says, uh, I know more node red but translate bluetooth to arrest api and consume it I don't know. I think no node red integration would be really cool james if you wanted to Do that Um Yeah, yeah, sorry Um, so this is where it is any help is much like really welcomed Um, yeah, thank you dear doc for the reminder. Let's just do that Uh, we're gonna make the discord chat CSS better I should figure out how to get it. All right. Hey, there we go What's better? Thank you Shipshoop says These are awesome streams lurking and learning awesome and yeah, thank you all so uh Let's wrap up. This has been another circuit python not when I was gonna say circuit pipe on weekly meeting This has been another deep dive. Uh, thank you everybody for joining me on this adventure into javascript land Which is new for me We do these deep dives pretty much every week it On fridays at 2 p.m. Pacific Here on the discord channels twitch youtube LinkedIn Periscope for a while. I'm not sure that's going right now Um, if you want to join us on the discord, we chat there all week You can go by join that by going to a da fru.it slash discord Um, that'll get you in there. If you want to support me Financially, please just support adafruit at adafruit.com. Um, if you don't have any ble devices. I that's what I would recommend Um, picking up something with an nrf 52 8 40 if you want to follow along with what we've been doing um Yeah, and they pay me to do all this. So any any benefits to adafruit, uh come my way as well um next week should be on friday and uh, thanks as always again to dcd David for doing the time codes It's really appreciated especially for the folks that are watching this after the fact And with that I'll pet the cat and we'll get out of here. Um, and thank you everybody for dropping links in the in the discord chats So let's do cats and I'll wake him up Have a great weekend everyone. We'll see you next week He doesn't realize he's uh Gonna get thrown in his crate to go in the car to my parent's house All right, we'll see y'all next week Have a good one


Are you a dropshipper that loves to stay on trend and sell the latest hotest selling products? Well then this video is for you. I'm going to talk to you about the top products to sell in July 2021. How do I know these products are trending? Well we put a lot of work into our algorithms and database to cherry pick the very best products for you to sell month by month. Right now, as you're probably aware, we're in the month of July and that means we're going to see a lot of summer products. By the end of this video you'll know exactly what to sell that will help your dropshipping business skyrocket. It's super important to stay ahead of the game in this competitive field and that's why before we move on to our hot selling products I highly recommend you subscribe to the channel. We post videos every Monday and Thursday with tutorials and tips on how you can succeed at dropshipping and get those sales. So our first product of the day is inflatable pool floats. More people are out there swimming, getting wet, it's the season, it's summer, people want to cool down. So why not buy a fun inflatable pool float? And here you have on Amazon all different shapes, sizes, foods, animals, whatever it is, and you can choose a whole range of products. Now a tip I have for beginning dropshippers is you don't want to just choose one of these unless these on your store. You want to choose at least 20 and list them on your store so that way you can find your best sellers. Our second product of the day is bug zappers. Now again it's a hotter season, you've got a lot of mosquitoes outside and some people just don't want to deal with it. So you've got a bunch of variations here that you can find on Walmart. Some for the porch, some for indoors, some for swatting them like a sport. And again if you don't want to just list one product I recommend you download the Autodesk helper and here you see this little Autodesk circle on the corner of the screen well you could just click on that and it'll take every product that's on this page right now and you can download it to your desktop in a CSV file. And then what you'll do next is go into your Autodesk account and upload that CSV file and it'll take all these products and put them in your draft section. It's a nice little shortcut instead of taking these products one by one to your store. This is a good shortcut and that's why I highly recommend using the Autodesk helper. Our third product of the day is a patio umbrella light. Now this is a product I didn't even know existed but it is super popular once I looked it up. You could see here some of these have you know 23,000 views basically this product clicks on to the top of your umbrella and adds more light outdoors. This I guess fits into you know the patio furniture outdoor furniture niche and it's like a niche within that niche because it's lighting. So it's a very cool product. They have a bunch of different variations on Amazon that you could choose from and it's a low cost item product and that's why I recommend listing more than just one quantity because you never know people might buy more than one. Our fourth product of the day is air mattresses. Now this again is a popular product in the summer because more people are going outdoors and some are camping and not everyone wants to camp in a sleeping bag. I would prefer also to sleep on an air mattress even if I'm roughing it outside. So here you have a bunch of different variations on Walmart and you could get you know cheaper thinner ones like this one for you know eight dollars or you could get some that go for 80 dollars and that's where I recommend implementing the upselling strategy where you could list a few variations and give your customer the option to upgrade to a better version when they're you know checking out. Our fifth product of the day is beach blankets. Less people are buying beach towels and more people are opting for this new trend which is beach blankets and it's a very hot this summer. So what these beach blankets are they're basically different because they're waterproof and they're less likely to collect all the sand. You can easily shake them off and that's why they're so hot this summer and basically there's a bunch of different fun designs that you can choose from and again I recommend listing multiple variations to find your best seller. Our sixth product of the day is poppet fidget toys. Now I know from my own experience with my nieces and nephews that these are everywhere kids are obsessed with them so they're not necessarily just a summer product these are actually year-round evergreen products because kids have been obsessed with them lately. So you have all different fun kinds shapes sizes you've got this one that looks like that video game I'm behind in the times and you've got these that are shaped like different animals foods whatever it is you have a bunch of different fun variations to choose from on aliexpress and again because these are such a low ticket item they're under $2 I recommend you list more than one quantity because I think when people go to buy these they'll see it's so cheap that they're gonna buy multiple they're gonna buy one for their daughter their son their niece nephew whatever it is. Our next product of the day is waterslides which you can easily find on amazon.com so you have a bunch of different variations here some with little pools attached some that are 32 feet long and you just slide on down and this is a perfect summer product a lot of parents are trying to figure out what to do with their kids not everyone sends them away to summer camps and they want to find activities to do during the summer and this is an easy one to go with and that is why this is such a hot selling product our next product that we highly recommend is another camping product this is a camping hammock like I said before more people are likely to go out camping in the summer it's that time it's that season we've got nice weather and people want to just get out of their houses you know it's been a year of a pandemic people are ready to break free and be in a bit of nature so this is the perfect product for this season and once again you have different variations you've got colors some that are for three people some with some cushions you know and some that are you know a bit more practical and easy to pack up and that's why once again I recommend you list a few of these and see what turns out to be your best seller that you can later focus on in our last product of the day is a camping cook set now once again camping super hot right now and that's why you really want to get into this niche there's so many little different products that people like to have on their camping trips to make them more enjoyable and this is one of them so here you have again all different kinds of sets you've got higher ticket ones that include more are for more people or you could go for the lower items that are here that are just the basics and that's definitely just based on your preferences on the kind of products that you like to sell but if you do go with a higher ticket item something like this that's $80 over here $120 you do have the opportunity for a bigger profit margin and that's why I would recommend sometimes going for those higher ticket items anyway those are product recommendations for this July hope you enjoyed the video make sure to click that like button and hit subscribe thanks for watching everyone