 hello hello if you're watching this after the fact make sure and check the description below for time codes this is a two hour long video typically so just check the time codes below to skip around into the parts that you want and I just here's cat cam we'll see you then gets up after I start talking you can see she's she's closer to the tarp here chat window is open checks got live check thank you Bruce I'm a little late because I was trying really I want to get rotary IO done so I was working on it thought I had everything set up but you know it actually works pretty well I didn't have to open OPS once which was good kiddies hi omsai hi Keith II I lose there until on thanks for joining me on this stream hi David good afternoon let me pause my streams here we'll get going in just a bit hopefully the twitch title is correct I might have to kick her out she starts bothering me link to Google Docs I yes thank you hi Christian sorry about that I thought I made it but I forgot to hi Bruce S twitches ask an engineer oh great I wonder if I can it got an invalid invalid response from twitch API let me just try to update it again mmm twitch API still didn't like it I don't think I might be able to change it on twitch hi Gary hi K man we've got lots of RP 2040 stuff to talk about which is exciting I think so I have to go back and actually look but oh everyone's objectified still I don't know when are they gonna fix that this is definitely not an ask an engineer I'm not sure I can sorry it says ask an engineer I don't think I could change it I have moderation privileges but I do not have title privileges so if you're on twitch this is well you can ask me stuff it's just not officially ask an engineer okay so it's 201 I think we got everything going if somebody wants to just comment in a re-stream chat or in the twitch chat that would be awesome so I'm I'm I don't know if you notice like the camera is a little bit different I'm trying like I was having a lot of hand trouble well not a lot but I was having some and so I I tried shifting like my chair down a little bit to get my hands closer to my mouse on my keyboard and so the angle is gonna be a little bit different and that's why if I stand up like I'm a little bit too tall hi hi Keith hi DJ DJ Ian Dunn maybe we can see you on twitch awesome thank you good night med from Morocco sorry it's it's late all right I'll do house keeping and look at going if you have questions go ahead and cue those up I was happy to answer them that's part of the housekeeping but David doesn't see the twitch chat it the twitch chat doesn't show up on the stream but I can see it myself I've had like I don't know how to moderate the things that come in to stream so that's why I don't put them on the video the the YouTube one that the YouTube and the discord stuff we can't moderate so I feel better about that being encapsulated on the stream forever more Johnny says you were talking about a camp difference in camera setup but my stream started out at 480p so yes indeed yeah hopefully you can kick it up to HD and it looks okay I think I said hi to Gary hi a lizard from twitch or from Twitter cat activity it's winter in Seattle which means the kitties are cold which mean that means that Vin likes to sleep with spook should I just like spend two hours watching the cat sleep does that sound like a like a good plan one says at least for me it's full HD and the cats are front and center perfect Moto Timo says happy Friday Tane very pleased with 6-1 circuit Python 6-1 good the cats won't the cats aren't actually in HD the camera that is cat cam is not actually HD I am I think but they are not they are just they're just on a C920 think it's a 920 lose their intelligence as are they named after Mistborn characters that's exactly right they are named after Mistborn characters hi Sean Sean Reed from YouTube chat okay let me switch away from the cats they'll be up in the corner corner and do that do the housekeeping so hello everybody my name is Scott if this is the first time watching this dream welcome I good morning an expected maker tail auto a talkie from Bellevue really close to me so I'm I'm Scott I go by tanute online and I'm paid by Adafruit to work on circuit Python those are two things you may not know so first circuit Python is a beginner-friendly really easy to get started version of Python for micro controllers which are a little tiny computers and here's an example of one let me switch to product showcase mode here is the Raspberry Pi Pico and the the black chip in there is the microcontroller pit piece of that it's a computer that runs at 125 megahertz and one of the many microcontrollers that we support with circuit Python you plug it into a computer it shows up as a as a drive and it has a code.pi file on it that you just edit and you're off in a way so that's circuit Python Adafruit if you don't know is a modotima says experts love circuit Python too yes a lot of the stuff that we do in the name of making things beginner-friendly actually benefit experts as well so there's a lot to be said there Adafruit is an open source hardware and software company based out in New York City I work remotely for them so I'm in Seattle and they've paid me for four plus years to work on circuit Python and make it as awesome as it is so if you want to support me support them by going to Adafruit.com and purchasing some hardware sounds like Hams lab just got their Pi Pico that's awesome and opening it right now Chris in YouTube chat says I actually broke the boot select button on my Pi Pico oh no you're gonna have to put some jumper wire on there to do it okay so continuing on housekeeping you can chat with me and a lot of others all week long by going to the Adafruit Discord server which you can do by going to the URL adafru.it slash discord I'm on there there's a circuit Python channel there's a help with circuit Python channel a lot of help with channels and that's great hi Neridoc on Discord thank you for joining us and helping us there so this is a deep dive they happen every week they're normally on Fridays at 2 p.m. Pacific which is what we're doing now but occasionally they are shifted to Thursdays at 2 p.m. that's if I want my Fridays for some other reason so as a heads up next week I will be taking Friday off which means the stream will be on Thursday so next week will be on Thursday it typically typically goes for two hours or more and usually we end up spending like an hour talking about questions and stuff so if you have questions I know that Twitch is incorrectly saying this is ask an engineer so I'm an engineer you're welcome to ask me stuff that goes for every every week so questions are welcome if you have those put them in the chats I think I'm watching them all but primarily Discord and YouTube are the ones that I can see the easiest last up housekeeping wise we have two cats here and you can see him both then is currently sleeping on spook and spook is epileptic which means he does have seizures from time to time he hasn't recently which has been great but it does mean that if he does have one I'm gonna like pause and not be talking to the stream just while I watch him to make sure he's okay and besides that that's should be fine but it has happened so I just want to warn people and with that I think we'll get started let me see if there's any folks that have any questions I don't see any questions Moto Tumas is a giant thank you to Patrick van Osterwijk for the Wiznet 5k whiskey server port looking forward to the power over Ethernet feathering from crowd supply and Bruce asked finally received two CM4 modules Sean Reed asks met a question which is is there any reason you would prefer a specific platform that we use to watch you on no it doesn't really matter to me we use a in intermediate service called to restream so I I streamed one place and then it goes out everywhere I if you're not on discord I encourage people to join discord simply because it's a chat that lasts all week it's it's not like the chats with the streams where they kind of disappear after the streams are done so if you do want to chat I recommend the discord chat and specifically we're in the live broadcast chat channel on the discord right now that's where that's the channel on the discord that I'm monitoring but platform is really up to you it doesn't really matter to me and we'll see if then wants to get kicked out here Bruce says I'm wearing my laptop specific glasses so I can't see my TV to watch clearly but I can type real good now that's good okay so I procrastinated long enough to see if there are any questions and I'm sure questions will come up as we start talking so I think I want to start I have a couple yeah I have I have some items I want to talk about oh here's a question and let me take a timecode here will there be RP 2040 boards with Wi-Fi on it so I know that Adafruit has announced not Adafruit Arduino announced that their board will have a Wi-Fi module on it I don't know of any one that is planned from Adafruit but I know that a little more Lady Aida said that the feather the ESP32 feather wing the airlift feather wing does work with the feather the feather RP 2040 so that should be coming out real soon now and so that's that's one option is to use an external co-processor there so yeah there will certainly certainly be boards with Wi-Fi on it but honestly if you're gonna do circuit Python I really would recommend just doing an ESP32 S2 instead it like having two co-processors or two processors communicate it's like pretty tricky I'm seeing what the cat's doing next we have a question from foamy guy who says would it be possible theoretically to have a module that works in the background kind of like Rotary IO or gamepad but is responsible for reading touchscreen data and curing it up to return it into the foreground when requested yeah totally that's that's totally possible and I think that like you know we've been thinking a lot about this and I actually stayed up late this week for the Melbourne my micro Python meetup and I'm always curious to see what they're doing and they have been doing some really interesting work with async IO and Vee Lee and so they're they're you know Damian and Jim are very very smart and they're thinking a lot about what asynchronous hardware APIs look like so I'm very I'm very interested to see where that goes it's something that like we've we've started a bit too but I like there's so many other things I want to do I don't think that we're gonna be the people to push the asynchronous stuff at least the the folks that work on circuit Python for a to fruit like there's just so many other big tasks to do instead that like that I think are really important and and those of you who watch my streams know what those things are like Billy workflow in particular good we're getting the questions awesome okay the next one oh David's enemy okay I'll answer that one first say Moto Timo asks any risk 5 port plans for circuit Python Allah ESP 32 C3 or the Beagle 5 so I think this is I've ranted a bit about this already risk 5 itself is not that interesting from a port perspective for circuit Python because like the compiler handles Trent but translating RC code to risk 5 like there's very little like CPU core specific stuff that is involved when it when it comes to porting things so like risk 5 is very very cool and I'm glad to see it adopted but it doesn't have a whole lot of meaning to circuit Python like there's one bit where we read values out of the registers of the CPU to make sure that like a pointer to an object on the heap is not living only in the CPU like that's the one thing we would have to change to actually support risk 5 and I assume that we have it in there because we actually do support risk 5 soft cores on the like we have a port for Litex which is a latex is a system for creating system on chips in FPGAs and they use they use risk 5 so yeah the challenge the challenge with these chips like the the Beagle 5 or the ESP 32 C3 is actually the hard part of a port is the peripherals the hard part is like figuring out how they implemented I squared C in the hardware and like adapting that for the AP the I squared C API of circuit Python so I I haven't looked much at the Beagle 5 I don't know why we would go that direction I suspect so for the ESP 32 C3 I think we will do it eventually but it doesn't have USB it doesn't have native USB which means that which means that like the there's no real like you don't get the circuit Python workflow and so the C3 support I think in my mind is blocked behind the like having a proper circuit Python workflow that doesn't involve USB it involves Billy instead let me answer let's let me answer this other question first I see a couple so great questions so wow I'm like four questions back Ja Jabba Dabba do be do asks is it possible to use an ESP 32 board to connect to Wi-Fi yes yeah so if you look at on let me pull up the desktop if you just go on learn.aderford.com and look at Airlift Airlift is the kind of like our brand so here's just an external ESP 32 Wi-Fi coprocessor breakout if you don't have this breakout you could use another ESP 32 but this guide will teach you how to like connect it up and it's just you connect it over spy and then and then there's a an ESP 32 spy library that that will do all of that for you so so yes definitely possible next up from David sorry I'm taking time codes here to make sure that so that people can skip through the video so from Dave David Cabines is there a way of obfuscating code on the device we don't we haven't added a way to obfuscate code like you could do it as an MP Wi-Fi but really like that's kind of it not what we're going for with circuit Python so if somebody wanted to add the ability to do obfuscation you could you like will merge it in and stuff but it's really the low priority for us it's just not like just not something we care about like like we're all about being open and so it would require somebody else to come along and say like hey we want to do this or that to to circuit Python so lose their entailment asks would it be fair to characterize the Pico as a more as a more friendly circuit Python device than the Sandy 21 from a different given the increased RAM and clock speed almost entirely yes Pico like Pico is very clearly a win over the Sandy 21 due to the RAM the one thing that the Pico can't compete with on the Sandy 21 is like touch the touch peripheral and the analog output so the Sandy 21 is still a better choice in that regard but that's about it generally generally the Pico's are going to be the RP 2040s are going to be a much better experience for folks than the Sandy 21 for sure ah Tim says considering putting Blinka slash circuit Python on the Beagle 5 as a GSOC project for Beagleboard org that would be cool I mean I think I really think native stuff would be really neat which is a good segue actually because Christian asked is video output also supported using circuit Python VGA and it is not this is something that people have been like doing some cool micro Python demos with and I've had this task of really like I really would like to support video what are you doing then but it honestly I don't think it's worth my time like if somebody else wanted to do it that would be awesome like we're not using the I know David G really wants it to we're not using that second core for anything right now so there is a an idea that we could do that I'm not it's not clear to me how much RAM is being used by the video stuff so like if it's using the bulk of the RAM then like then you're not going to have a very good time anyway with circuit Python because the heap will be pretty small if I were to put my if I were to put my effort in the video I would do it via a bare metal Raspberry Pi like a proper Raspberry Pi because that would give HDMI and that would give HDMI support like dual HDMI full-color full-color support so like I feel you I understand like I think that like video is something that we need to unlock at some point but really like the way that I would do it is I would do it with a regular a regular Raspberry Pi because it's going to be it's going to be way more compatible with TVs and stuff if it's actually HDMI and I know that there's been demos with demos with the Pico and doing DVI as well and yeah if you think it's fun if you think VGA is fun like you're more than welcome to add it but you know when it comes to prioritizing my time and the time that Adafruit is paying for I wouldn't I know a little more has a prototype for a VGA breakout so you know made me she'll do it too but I just like it's also the other thing that's on my mind and I really want to get to is the BLE workflow stuff like I feel like the VGA stuff is nostalgia for folks like me who are like 30s and older and the reality is that that's not going to be like the nostalgia comes from like that being your introduction to computing and the reality is that that is not that is not the introduction to computing that people growing up now are going to have like their introduction to computing is phones and so like if you it's it's much more interesting to me to support phones over video so I'd love to do video at some point and if somebody does it for me even better but in terms of like what my preference is is yeah okay so that's that there isn't certified on VGA support yet if somebody wanted to add it that would be awesome I'm not planning on doing it and it asks what's that thing between the green ball and the black printer I think oh yeah this is a it's a cat it's a cat cardboard thing so I don't know if you saw Vin scratching on that as well but yeah it's a cat scratcher now you can like it's tilted up right now but you can like have it in the window they can lounge on it and stuff ah let me make sure David's keeping up to thank you again to David folks for doing the yeah Christian is 1984 so yeah like I'm 1986 so like I feel you the nostalgia like I have a bin full of gameboys and I was thinking about re-spinning my Gameboy cart for the RP2040 like I feel the nostalgia I understand it but it's a I think the BLE workflow is something I wanted to wanted to do for years and I just gotta like force myself to do that earlier handslabs asks is it possible to use a Q-Spy PS RAM chip with the RP2040 like is used on the ESP32 rover and the teens E41 I I don't think so I don't think so I know that both of those chips have ways of like they have two memory map regions that they can address and the thing that manages it has two chip selects as well so I know that on the ESP at least they share the key same Q-Spy but you have like different chip selects I don't think so I wouldn't be surprised if you could do something like I wouldn't be surprised if you could do something like use it with PIO or something but you're not gonna get like I don't think you're gonna get like native memory mapping for it the place to look would be the SSI I think it's called SSI in the data sheet which is the thing that does the like mapping and stuff Todd that says awesome I can't wait for circuit Python 5g boards yeah I mean I think connectivity is probably interesting too yeah sorry for for talking about age stuff I just think that I think it all the the Nassauce stuff is really cool but I was thinking about it earlier today as in like that classic Wayne Gretzky like skate towards the where the puck is going and I think it's you can't deny that mobile is is really where things are going so if somebody wants to do it like I said I think it would be awesome but I think that if I did video I would do it with the Raspberry Pi bare metal and then but BLE BLE workflow is just gonna take a lot of time to mature so it needs it's more important to do it sooner as well all right let's talk about some stuff okay so one thing I wanted to point out here is well if folks haven't seen it chips have been sent to the first kind of core companies that are supporting the RP 2040 then says totally joking about the age thing and do not mind at all just fun to tease each other yeah I agree I mean I feel that nostalgia too like I want nothing more than to use my Pi 400 as a terminal for circuit Python like I I totally feel you but yeah so what I wanted to show here is actually so chips are out LaMoure showed that Lady Ada showed that on Wednesday we have chips in hand which is super exciting so that's what we were waiting for although I'm not sure where whether we have our feather PCBs yet but I think the feather is probably the first one she's gonna make but Pimeroni just launched and Pimeroni thanks to I think Zodius and Infuser added the Kibo 2040 the Pico system in the tiny 2040 to circuit Python so they're officially merged in which is awesome and I heard from Guru Paul who's also at Pimeroni that it sounds like the Kibo 2040 which I don't think is available yet but when it is we'll also be shipping with circuit Python so I'm super excited for Pimeroni to start embracing circuit Python they do a lot of Python work and they do some like really beautiful board designs so I'm very excited to have them on board with circuit Python Sean says I ordered a couple tiny's awesome yeah so it's very cool to see them adopting it I talked to I think a little bit about the flash work that I needed to do and I basically earlier this week let's pull up the PRs because I do want to go over those it's just been like this week I felt like there was a lot of progress on the RP 2040 so let's first look at the closed stuff so I did look at that so much stuff where is it add definitions for Pimeroni 2040 baseboards so what I did is I we had a we had a total flash size defined and that was originally just in the file but now it's now I moved it out so it's on a per board basis instead so that was really exciting and that means that boards in circuit Python can have different sizes so that'll be really really cool okay we got more questions so Ham's lab asks does Adafruit have any plans for the new dual core asymmetric multiprocessing chips like the STM 32H series or similar chips from free scale not immediately you know like the Pico the RP 2040 has two as well so that it's something we're starting to think about of like how do you how do you support multiple chips but really it's not super high priority for us a lot of what we're geared towards right now is just like enabling projects that we already support right like that's why pulse in is important rotary IO is important like we have all of the things to teach people how to use those things already we just don't have this the software support so we're definitely very much in that like let's just get everything working that we know people want already you art is another example one Carlos asks is Raspberry Pi releasing just standalone chips for everyone or is this limited to only partner board makers like Adafruit I think in the long term in the next few months I would expect to see it available for everyone I know there were some makers as well who requested samples that were kind of outside of that first group of folks that knew about it so my understanding is that this first batch that they just got like is just going to some select folks like probably the folks that were part of the original announcement are the folks that are getting this first batch of chips but that the goal overall my understanding is that they will make it available generally it will be generally available when they like have enough of them okay Mark Olson asks is it not Pimeroni as in pirate not pure it and Todd bot says wait so it's Pimeroni not Pimeroni I I feel like when I've heard them say it got really bright when I've heard them say it I think I've heard Pimeroni so I think Pimeroni is right if you go back there are some like videos when people could actually visit one another there's like videos of the Pimeroni folks visiting circuit python or it's not circuit python Adafruit and you can see that lose there in Telemann says now say tuple I think it's officially tuple although tuple is also one that people commonly say Wisnet 5k library still requires bus device library which moved to the core as in native yes bus device is is available on most things in the core as a native but not all there are some boards that don't from their shop Bruce says Pimeroni stands for pirate monkey robot ninja and sounds like the name of an expensive Italian logger it's pronounced PIMO RONI from their shop is it pie pico or pee pico let's see it's meant to be a q2 for general lace for the for the RP 2040 chips David says do micro python and circuit python have the same memory requirements essentially yes officially I don't think so I think there are a few cases where micro python is running in 16 kilobytes of RAM particularly the micro bit v1 is what I'm thinking of your experience is really not going to be that great and in fact with circuit python we officially sport 32k RAM but we don't really recommend it anymore so generally the more RAM the better but I think I get the impression that we can we can attribute having so much RAM in the RP 2040 that getting them getting micro python on it really early and realizing like like if you if you see what they've talked about they've act they actually had an a0 rev of the chip and that a0 had flash on board and a lot less RAM and I think getting circuit getting not circuit but micro python on there made them realize that like oh you know what like we can not only make this cheaper but have a ton of RAM if we move the flash externally and that would be much better for micro python so I think I don't know this for sure but I I get the impression that you can officially say like thank you to micro python for making the RP 2040 as awesome as it is. David G says E and UK support in circuit python well for Pimeroni people we have pirate already but yeah if people wanted to do E and E and UK feel free it's not on my radar I don't know how many like colors with a U without the U we have but yeah if people want to add new translations we're always welcoming that always welcome to that oh boy okay so I wanted to recap just like what has happened to the last few days the last week eight days ago we merged implementing you random so random is now and that's thanks to Jeff this is a huge one this this is what Dan Dan did is the second USB CDC serial channel Tim says so that's where Ian pirate came from not quite Ian pirate is courtesy of summersoft who wanted to have a version that people could feel more comfortable learning on and so it was kind of a fun play to have pirate on there and people could get creative so this is a big deal this secondary USB CDC channel closed the like the oldest open bug we've had for like years summersoft says it started as a joke so this fixed bug 231 which stems from this idea that like people want to be able to control circuit pipe a circuit python program from their computer and the way that they're comfortable doing that is with a serial connection to it and usp can fake serial connections the problem was is that the only serial connection we prevent presented up till a week ago was also used by circuit python which meant it looked really closely at saying like oh is there like a control C character and if there is we'll do something special which means that you can't use that connection for generic like any sort of bytes because there are certain bytes that mean something to circuit python so so the secondary ccc DC connection means that with the next beta when you plug your device in you'll actually see two comports or two ACM ports on your computer the first one should be the circuit python one and the second one will be the generic one that you can talk to from circuit python David G says many people had projects for the second serial where are those projects now I think they'll realize it I think we're gonna see it I already recommended it to like one person who wanted to do like keyboard software and be able to configure it from the computer the other person was also I saw somebody also wanting to do a 3d printer and like that's really good if you want to be able to send any sort of command stuff Brady B says any hope of using a second serial in Sanity 21 you should be able to enable it my understanding is that the the API code for the secondary CDC connection takes too much space so it's there are enough end points but there is not enough space so you would have to do a custom build that turns off something and then you could turn it on you could turn the secondary CDC on J F Abernathy asks does the second USB port mean that you can use USB serial while testing deep sleep instead of simulating it no unfortunately because deep sleep actually shuts down USB so it will it will disappear with that as well Sean says that's a great fix yeah so thanks again to Dan as as Tim points out Dan finally hi photo chromax so that's really exciting that knocks out one of the oldest bugs I don't know what our oldest bug is now maybe we should see we have 405 open okay so this is a generic help test builds help answer questions and then I guess the last the oldest one we could actually do is the idea of breakpoints so many prototypes that this I don't know if we close I think we still do need to do that that's an oldie all from 2017 anyway so that's super exciting I think you know David applies like where are those people now well they've had a week to discover it and so I think we will see a lot of cool projects I know it's on Dan's radar to do a tutorial or guide for that as well so bit transpose so there's now a bit ops bit ops module but Jeff added which allows you to do low like I have eight byte arrays and I want to like pack them into everything that's for the shift register Neopixel stuff that Jeff just did which is very very cool as well so you can like output to eight Neopixel strips concurrently right so OMSI says on a side note newer versions of CPython support breakpoint instead of having to use import PDB set trace yeah and I think that's I was picking breakpoint is something if we ever added it that's what we would add and then also there's what is it sys dot set trace which is like the the like fundamental unit of a lot of Python debuggers that's the other thing we could add as well okay so let's see that's a whole page of PRs in just the last week so it's been a busy week ignoring the idea of tools holder definitions for the Pimeroni board so thanks again to Zodius infuser for doing that we have a new version of micro lab I'm not sure what's in it but there is at least a bug fix Jeff added memory view cast board is update for the tg watch fixed for the USB CDC stuff pulling in float stuff that we don't want this is a merging the mass storage endpoint pairs so this should actually make room for the CDC on the same d21 in terms of endpoints not in terms of flash size Jeff saved a little bit of space by not doing the serial number in a statics variable unexpected maker added tiny s2 definition some presence fixes and then here's the board specific flash sizes for the rp2040 so that's that was me fixing that some file level stuff typo oh merged in ice I squared s and PDM in support for the rp2040 and it also greatly improves I think the PIO API so did I cover this last week I think I did because I found an error in it but if you go to the the main API page and make sure you're on Ian latest it's not the default rp2 lots and lots of stuff here now there's initial pin state and initial pin direction so that has logical defaults so it actually makes it much simpler to get going previously you had to like if you wanted an output pin you had to figure out how to get it set via in it and now you don't have to worry about that at all there is wait for TX stall as well so like you can write programs write two programs that do not stall so that's cool too Johnny asks did you fix the error messages or do you want me to do you still want me to do the PR I did not fix them there was one where I'm I typo direction I think that Johnny found and sorry I just didn't do that I'm if you haven't realized it yet I I kind of play this role of like trying to work ahead of everybody and I don't do it perfectly but I do you like get a big chunk done Todd Bout says I bet your Python linter loves that state machine constructor with all those arguments that's a beauty of having import implemented natively is that it doesn't actually we don't actually lint those API's which is funny it's not too bad actually because like there's a ton of keyword args but they almost like there is what two two required arguments and the rest are optional or the rest are keyword args with defaults so like when you actually use it from Python it's like it's very it's very logical it makes a lot of sense I think to like you only list the keyword args from here that you're actually changing and I think it makes a lot of sense I'm actually adding two more to this for rodeo I'm adding pull up and down so here you can see if it stalled on Rx that that tells you if you were reading that you missed something and that's something that I use for PDM in so basically the way that I I've been expanding this is just to use it for something internally and prototype it externally and then move it over and anything that I want to do from Python that I can't do but I want to do internally like most of that stuff I'll I'll implement first so I can test it and then go from there oh and I forgot but now you can also do you can read and write you used to only be able to write now you can read and write and you can do it in one two or four byte increments whereas before it was only single bytes so that's good you can restart you can run now so you can just run instructions on the on the state machine and you can stop so those are new right we had before read into is new right read into is new as well one caveat with right read into this is an API that we kind of inherited from spy but it's important to note that because PIO can do any sort of like transmit and receive at the same time write and read into will just like there's no synchronization between those two things it just won't return until both buffers are full I don't know of anybody who's actually using that yet and maybe that's not useful so we'll see and then lastly we have clear rx-fifo we want to reset stuff hi Hugo okay board specific flash sizes audio bus IO oh I did some fixes after I fixed the audio bus stuff I was kind of waiting for I didn't have a lot of time and I was waiting it for it to do all the CI stuff so I fixed the second shared PWM Kevin Walters had found that if you if you're use it if you're trying to share two PWMs slices so like you have a fixed frequency but between the two what would happen is that like the first one would work and the second one would not and so I fixed that and then Dan tested it and found that if you allocate one and then try to allocate the other with a different frequency it fails but if you allocate the second one with the same frequency and then DN it then you can do the second one again with a different frequency so 10 found a bug there that that is fixed in this PR hi Pablo from LinkedIn Jeff found a bug or an improvement for pixel buff so brightness scaling is going to be quicker now it doesn't do floats now it does ints which will make it quicker especially on M0s where they don't have float hardware some pin name fixes from unexpected maker K match improved blitting so that you can blit to the same buffer cleanly Jeff Jeff reviewed my fix for my improvements to PIO and then promptly was trying a demo and found a bug so he fixed the bug which is great I just merged in an update for the feather RP 2040 pin out we're any day now we're gonna have a new beta and I wanted to make sure that the the new beta would work on the production boards I've got like the first rev and I think the production ones are like rev 3 rev C versus a which is what I have so I I have to remember that if you see me testing and be like why isn't it working it might be because I'm using the pins that changed the pins that were changed were something that I actually asked Lady the dude to do because the if you know the feather it didn't their numbered 569 1011 1213 and so what what she had done is just like done GP 5 GP 6 GP 9 GP 1011 and I was like hey you know it's better if they're all consecutive because the PIO can write to any set of consecutive stuff so that's why the the pins changed between my version and the production version was to just get more consecutive pins available on the pin out for the feather hi Alvaro this is my I usually have two glasses of water and I realize like what if I had a water bottle that I could fill up my glass with because I it can sit on my desk and I don't have to worry about tipping it over whereas I usually put the second one behind me and I don't usually use it okay we're about reaching our hour so maybe you want to dive in and maybe I'll do rotary I L actually I know OMSI is here so I need to talk some more about flash I want to start that too will you be announcing the availability of the feather 2040 in the store during a deep dive again work well for the mag tag I don't know I'm not sure I don't I'm not sure when they're actually making it I'm certainly like it all depends on when they make it I don't know when they're when they're doing that exactly hack that hydration thank you pithwa asks excited to get my hands on a pipe you go can circuit by the know the USB host status I eat connect to a phone and it goes to sleep whether USB is connected or not I think we have a way to check that it would be under supervisor supervisor maybe not maybe it's oh yeah runtime serial connected so that would tell you if yes serial connected I think is what you want for that yeah David said didn't lady I mentioned dropping in today on last Wednesday she did mention it on Wednesday I'm not I haven't heard from her if she were to drop by it wouldn't be for another 10 or 15 minutes we'll see if she pings me on slack well we'll do it and you can ask her questions as well so yeah for a pithwa I think this is your best best option at this point for detecting USB state David says don't forget to say that next week is on Thursday yes next week is on Thursday if you missed it because Friday I'm taking the day off and yeah and summertime changes in the US soon it does I don't know exactly when it is I think it's mid-March I think it's like three weeks away or something I looked because I I can't do the Melbourne Micro Python meetups in the summer because then it's seven hours different which means it would start at like 2 30 a.m. for me whereas it's like 12 30 now it's still late but not March 14th thank you Hugo okay Sean said deep dive time and I know that let me just there's there's some more exciting stuff that I want to advertise first and then what would then we could talk about it so let's look at open stuff Dan is fixing digital in-outs open drain stuff so that'll fix bit bang I squared C which is really good Dave Putz is looking at making the state machines reset more correctly he's also working on Pulse in and Pulse in should be really interesting for folks because Pulse in is used for DHT sensors and it's also used for infrared receive so if that's something interesting to you check out Pulse in with the Dave Putz is working on K-Match 98 has a bitmap tools which is a module for storing a roto zoom function which allows you to blit from one bitmap to another and do rotations as well gambler 21 is working on count IO for the RP 2040 and that's commonly used in sensors that just output pulses could be like a rotation sensor or it could be feel like I saw another sort of sensor can't remember DeShipu is working on making group use a Python list internally which will finally get rid of the max size stuff that everybody runs into with group and they're doing it so that they can sort things no worries this is all exciting stuff ooh speaking of which so microdive was working on UART let's see update IDF from Patrick protomatter from Jepler is getting close and VM is the kind of close oh yeah and gambler 21 is doing parallel bus for displays as well and that should be that was blocked by my state machine stuff so that should be closer to a bit ready and then we get into the some of the stuff that's like been lingering too long which is actually not too bad but we have this RP 2040 support for UART and I did some testing yesterday and I fixed a few more issues and then Jerry managed to test it and we just got a green check mark so I'm gonna merge it if there's more bugs we can always fix them so let's just do a final glance at it so for those of you don't know people want UART one of the reasons is that it's really well the main reason I think people want it is that it's used for GPS is so GPS is commonly will transmit that the GPS data via a UART so I have a this is what I used for testing yesterday it's a GPS ultimate GPS feather wing David G asks can I link the second CDC serial to your and do USB to serial with the Pico yes the I don't know if the USB CDC API will tell you bit rates and other stuff so it would be kind of a basic translator but yeah Tim says the name of the game for the first hours apparently distracts and usually that's the whole time not just the first hour but it means that we have a discussion and we talk a lot about different things so yes you are as in serial comms yes so it's in bus IO it's often people want it for GPS but it's also like something that people want as a way to coordinate with other devices as well because it's bi-directional and neither side clocks it like each side kind of like has a clock that they decide on up front so I've already looked at all these files and I was also the last person to edit them so I'm actually just gonna merge it there was it's actually surprisingly tricky especially when it comes to receiving data so the few bugs that I that I fixed yesterday had to do with the fact that like there's a there's a 32 entry RX 5.0 in the UART itself and then we have the ability to have a second ring buffer like a buffer that that on UART that you can configure the size of so what you can do is and then there's also there's versions of UART where you can have separate signals that say like don't send me anything else because I'm full and so if you fill up the ring buffer and then you fill up the FIFO you want to make sure that like you you tell the peripheral that you're full so that the peripheral can optionally signal externally that is full there was one bug where in so the way that it works is that when the when the FIFO gets above a certain threshold that triggers an interrupt and then in the interrupt we have code that copies from the FIFO into the ring buffer but when that happens like we make sure we don't we don't read from the FIFO unless we have room in the ring buffer to save the data there was a bug in the earlier code where it would read and then try to put it in and if it failed it just dropped the data which is not great and so there's another thing where because if the FIFO is full and the ring buffer is full the interrupt still fires but then you don't make it you don't copy anything over which means that the interrupt will actually keep firing unless you explicitly say don't keep firing so I had to add a thing that says like clear the interrupt regardless Johnny says can you demo your workflow fixing spelling mistakes yeah if folks find if you want me to do a quick PR to show how that's done well I can also cheat it where is that bug you really did distract me didn't you yeah so all the challenge with you are is getting those buffers and making sure you don't drop data and then like if you manage to fill everything up making sure that like you when you start reading from that again you reset all the mechanics to like copy things over get the interrupt going again and so there's also some cases where like squirrel yeah the interrupt doesn't fire right from the start so there's it's possible that the FIFO has a few bytes in it but it hasn't interrupted yet so in cases where you want to read how many bytes are available or you just finish a read I wanted to just like make sure that I make sure that you copy everything over Mike asks might be a dumb question but does the Pico work on Arduino IDE yet or will it ever work on it I don't think that's a dumb question so Arduino announced that they would be bringing support I don't believe they've released it yet their board is not released yet either but they've shown pictures of them making it so it should be soon and yeah they they said that their intentions are to support the RP2040 in Arduino but it doesn't yet so it's not clear exactly what form that is in David G says was there a mu meeting and will mu be confused with the second cdc serial there was a mu meeting I met me catney and melissa met with three other mu folks on Wednesday most of it was around changing the circuit python mode you're welcome Mike because they've seen cases where like code gets lost because it's only on the device so there was some discussion there and there's issues on the mu repo for that Dan did test me with the second cdc serial and in his experience it did not get confused but we also did make sure that there's a way to their the interface name for the different serials or is different so we should be able to also use like pi serial to read out the interface name and pick the right one hopefully so we don't we don't we don't think it's going to be a problem but I wouldn't be surprised if there were some folks that they got a little confused by it all right where is this typo Johnny is it in my latest code so here's what I'm going to do I'm going to just edit it from github um I think it's in bindings it has to do with direction direction but it's typoed where is this typo it might be in the David says that's valid to edit on github yeah yes I mean this is exactly why this is where editing on github is perfect is like if it's just a typo yeah here we go initial set pin direction without the t conflicts with initial out pin direction can you see that so there's the typo and so here is a tutorial on how to edit from github so up at the top of the file there is this pencil icon you just hit click that and now you get an editor this might not work actually I might fail the translation step but that could be cool I could show that so let me add the t and we'll see so I'm going to call it typo fix direction oh and so here so we have main is protected so you'll the only option you'll have is to create a new branch and start a pull request so I'm just going to do that Hugo says fix typo and github web editor commit and merge break build because line is now one character too long well you don't have to worry about that because like it will still double check everything right like I'm not committing directly to it the pr will be tested before it gets merged Charles says I'm thinking about building a vt 2200 dumb terminal for use on my pdp 11 slash 23 emulation so there's this really cool raspberry pi terminal project terminal project I forget what it's called high freckled science what is it called it's open source bare metal raspberry pi ha ha ha vins back in her bed is this it there is a project for raspberry pi where you can just feed it serial and it will do it and I saw it on the a different blog and I don't Johnny I think you could do this other type of fix pi kvm is that what it is I don't think it's a kvm sorry I don't remember am I on youtube at the same time yes I am I got lots of chats we're also on linkedin and twit we're on twitch linkedin twitter um okay so for Todd bot says for supervisor dot runtime dot serial connected it's only if you have like screen open pi graphics I love having the chat it's a bare metal kernel that implements a basic antsy terminal emulator with additional support of some primitive graphics functions yes thank you nailed it Bruce this is what I was thinking of I think that's pretty neat and it's like on my on my like in my the back of my brain when I finally do want to do um bare metal raspberry pi circuit python like that that will be one place to yep Sean nailed it too ah frequent science asks what's the best way for someone to start learning how to use and learn all the Adafruit projects and eventually develop projects um I think going to learn.com and finding one that's interest you and start with that start with that project they are also tagged with difficulty so you can if you're if you're new to electronics you can also look for the ones that are beginners see here you can see beginner versus intermediate and such yeah learn learn.adafruit.com Keith EE says at some point should I go I should google this but it keeps coming up is bare metal just assembled code versus running through a kernel yes that's what I that's what I mean by bare metal is that there's no OS and there's actually on the raspberry pi there's actually privileged levels um that is usually used by an OS to make sure that like untrusted code is not privileged um there could be an RTOS like Bruce says too but my intention is like when I say bare metal circuit python I mean like literally like the code that we have running on uh pico running just privileged on a raspberry pi David asks are there plans for a visual studio code rp2040 circuit python emulator like the playground express not that I know of uh the emulator for the circuit playground express was done by some microsoft interns um and I don't know if the hosts the intern hosts plan on having more interns um to do that it's not a priority for us like it's a question of like do we make the real device do more or do we not um and johnny's ahead of me on prs so I have this fix and I'll create a pull request maybe johnny maybe johnny fixed it in a separate pr and it looks like this the test did fail so what happens here um how do I fix if we look here it says translations failed so what do I do now um I expect it as much so here I am I'm actually I started rotary IO um so I have some changes here I'm just going to add them all so before I switch you'll never actually see that commit message so it's okay um but what I do is so this typo fix if we go to the pr we'll see um it's in main on 10-patch-1 which because I have privileges to the Adafruit repo it means it's actually on there which is kind of unfortunate I'd rather have it on my own but if I get fetch Adafruit now we'll see that it pulls down this new branch uh 10-patch-1 oh your your pr conflicts that's okay we can close one of them but if I do switch see 10-patch-1 so this now I have it local and I can do make translate local except I'm not make translate you run at the top level Hugo points out that Sean Hemel from Digikey has been working on a youtube series about uh MCU free RTOS stuff um JM says not sure if this was covered yet but with the pika house you aren't work going I can see good results on the pr would it there be an eta on that I literally just merged it like within the last 10 minutes of the stream I think so did I not hit the button that was my intent yeah it's merged so in about two hours it'll be available on the s3 bucket so if you want to get the latest of that you can do pico and then um absolute newest it says browse s3 and then pick your language like uh enus and now you can see all the builds that we have from the past and you'll just want the one that is from today or newer and the commit numbers there as well so takes a couple hours for it to run because it's building 3 000 versions of circuit python um but yeah check that out and where is okay so here's johnny's okay so johnny will have the same problem max four bytes long so johnny you're gonna have to follow me in getting doing the make translate step so I just need make translate and now if we do get diff that doesn't make sense am I not on I most have that's raspberry pi all rotary encoder right so this is a hangover because I moved it doesn't delete it where am I huh so I thought I oh you know what I'm I didn't actually check out what I wanted I just renamed rotary i o to tanute patch one that's why it didn't work check out eta fruit main kit branch d I just I just did this um tanute patch one I don't need that throw that away get switch tanute patch one without the dash eta fruit where why why do it there we no that's not what I want how did I do that I did it earlier today I could have sworn it would it just I what I'm expecting it to do is auto check out sorry behind on chat do you folks do automated unit testing using a hardware fixture to emulate devices no I would love to but we do not did I forget get fetch I think I did get fit get fetch I heard you say there were 3 000 ports and you can do this build setup I thought you were joking since I only see 150 boards but you just said it again is that true well it's like 170 times however many 170 times the number of languages uh and we're reaching we're closer to 200 than 150 um yeah sorry I I forgot that you were fixing things that translate would do that freckled sciences oh I never noticed all the guides there you go learn dot eta fruit com is what you're looking for I don't think you want the remote's name there that's what I thought too snoot girl get switch tanute patch one matched multiple remote tracking branches uh maybe that's why I'm being ambiguous the other way to do it is this check out eta fruit patch one so now I'm there okay that's got my commit now I can do tanute patch one now I can just make the branch there yeah motor Tim says we need to talk about this and build system wishes yes omside was what is watching too and we we need to talk about that so I think I could do I can save rotary i o for another day mom fossa says uh guys which there might be women here too so you know uh esp32 or pi pico if you want to do wi-fi I would do the esp32 s2 live deep dive deleting git history for fun and profit yes I've been doing git for four plus years explicitly now and I still mess it up um okay we're at the top level we're going to make translate and now see that indeed this entry has been changed Tim says we can have a build system testing session on discord sometimes yeah summer soft did a lot of work trying to do on device testing and I've there's a startup that's trying to make it easier too and I've challenged them on it as well um I do feel like talking about that though um let's just finish this and johnny I can fix yours too uh while we're at it um translations git add git push eta fruit uh tenu patch one space okay so this should show up here lady had approved it I don't know is she did you want to join let's see she didn't ping me I'll see if she wanted to do it yeah I know Tim you were talking about the build stuff I will I'll get to that I had I want to talk about these ideas I was talking with Dan earlier about them too but let me just um do exactly the same process but we'll do it with johnny johnny's is an example here too so johnny had the same problem uh changing a typo and a translate means it needs to run max well more is coming by Rodriguez says why not both that's a good question ESP 32 let's see what remotes I don't have well so I what I was thinking about doing was the flash stuff Paul says the boss is coming by look busy well she like she saw that I did a PR and reviewed it like I spelled burgdoll right right so here's how I know I didn't want each doesn't really matter this is just my name for it look busy equals shakes typos all right here we go hello let me pop you out thanks for hopping in I we're doing these typo fixes and saw that you like you reviewed it I was like oh she's around I wonder if she wants to drop in okay so folks can hear Lady Aida right hello hello should be unmuted we're showing how I struggle with get even after all these years oh whatever okay um we're good I guess I'll show yeah unfortunately my youtube isn't I mean I can't see what whatever you'll have to tell me what people are saying because I can't see it because like happy to be frozen I'm happy um they can hear you all right what am I doing okay that's great can they see me too yeah I think so okay great so what I'm doing this weekend um I had so much stuff that to do this week that was just like running company type things um but this weekend I hope to do some hardware and what I'm going to be working on is building the tester for the um feather rp 2040 because we got chips in on Thursday and we got PCBs in today oh great which means and the stencil which means that feather feather PCBs or or more than just feather just the feather I have to I haven't sent out the other ones but they take about a week so I hopefully I'll over the weekend I can also get together the itsy bitsy and the the cutie pie is actually done there's no reason I can't send it other than I just have this like emotional thing I have to like let's I have to let the PCBs go it's weird you have to like let it leave the nest or whatever right right so I'm going to be designing the tester and um shout out because I actually don't like this code tack wrote this code he got um this is really cool like we use often a teen c3.6 to program our boards have you seen our tester boards and the reason I use the teen c3.6 is one it's fast it's Arduino compatible and it has usb host right that's actually kind of the most important thing is it has a secondary usb host port and is Arduino compatible and I've tried using like usb host shields and it like never quite works I mean like it works but I've I sort of like having the usb host native also because like you know it powers it up um you know it can power through the usb which is a good way to test um but the the power pins on the usb connector are working and it has an sd card slot so it's like a lovely little board and you know um you know we we design custom pcbs and you can you know we have photos and videos of them and we just swap them out and we have a character lcd that gives us feedback because we have people who test and um we actually used to use raspberry pies for all of our testers not all but many many are our testers why because it's linux you know you can run abr dude from it you can run Arduino you know from it whatever you can you can run bosa whatever programming dfu detail in linux right and it actually works pretty well um but it's never quite as fast as like bit bang um programming um and second you also just have this complexity of linux right and like for example like this last weekend you know in a tester that had been working for years right and suddenly it stopped working and you can probably guess what it is um slash root got overflowed because the you know demessage log just eventually filled up the entire disk drive it's like four gigs but eventually after like years and years of this being up and like you know nobody noticed that it said like hey disk drive is like full right it eventually just like took down the system so it's a very rare occurrence right but it does happen so anyways i'd like to have um fully solid state testers right so the thing that's interesting about the rp2040 um this will be extremely interesting for the four people making rp2040 boards is that there's i think it's going to be more than that but yeah well okay they can they can watch this video so there's an also i'll cover this on desk a lady to hopefully by then i'll have the tester actually done right is you can program it with swd but they do multi-drop swd and like i tack who ported no sorry dean was the person who who worked for us he now works at a synthesizer company um he ported um dap uh open dap or free dap i don't remember what it was it was some swd bit bang arduino script or c-script and we made that into an arduino library which means that we can directly program boards that use swd that chips use swd arm cortex m0s m4s etc and this is awesome because i can program an entire sam d21 in like 1.3 seconds which is like faster than it takes jlink to even like start executing right by the time like jlink is like hi there's a usb device i've already burned the entire chip it's like incredibly fast and and we you know it it's it's bit bang and i've run it from you know metros and from teen season whatever it's actually a great library i really recommend people check it out and of course we have an avr programmer library as well um avr is a lot simpler it's a very there's only eight commands with swd it's like it's a very weird protocol anyways this is the ate a fruit underscore dap repo right yes yes which which i is like my number one favorite library but it i don't think people understand how cool it is that you can swd program from within arduino um like from an sd card it's like really awesome um for for people like me who spend a lot of my time making testers okay so so back up so we got the rp2040 and it's got this swd multi drop thing right and and so i was like well like we should support dap on it and tag kind of did it was just like oh my god like it's like not like they don't really publish everything and like it's not super clear and he sort of was like i don't really want to do this yeah and i said okay well we don't have to do it that way the other way you can program is over mass storage right it's a uf it's a uf2 bootloader right and um the you know the question is which is faster and the answer is well they're probably actually about the same speed um like normally i'll say this if i have like a sam d51 or 21 and i am programming it with a uf2 bootloader and then after that circuit python it is way faster to burn everything over swd then to burn uf2 and then drag and drop because like uf2 just adds a little bit more time into the mix however because the flash memory on the rp2040 is external the time factor is dominated by how long it takes to erase blocks so it doesn't really matter like whether you're doing like swd which you can be like blindingly fast because you can't just do it ship erase over uf2 anyways you might as well just like you just do a block by block and in the end it takes it's 100k per second no matter how you do it right upshot um although i want to prove that i'm gonna actually do some tests with a raspberry pi well the other thing to think about is we don't have to program the entire flash then either right so we don't but we don't have to do that under swd either you do it in in blocks you do it in flash blocks so either way i mean like would swd be a little faster like it might be a tiny bit faster because you don't have a usb layer but i'm not super convinced um i was going to grab you know the only thing is like when you compare with raspberry pi there's so many other os layer things that are adding time it is important to me to make sure that the test is fast possible so tak worked over the week and he wrote an arduino sketch that uses the mass storage post on a tc 3.6 to connect to um like you know in this case like a pico is what i was testing with and this is this is connected on the other side here like so this is like tc 3.6 i'm just testing it out the sd card has the uf2 file on it right and um tak also found like a small bug in the boot ROM of the of the rp 2040 so it's kind of kind of cool um well i mean just like i don't think anyone else thought of doing this um and also i think he also found like a bug or two in the tc msd you know implementation i mean all things being considered tack is probably the number one expert of implementing mass storage uh host and peripheral right now on the internet for those of you who don't know tak does tiny usb which is the core usb stack for circuit python and lots and lots of other projects including the pico stk yeah so that's why i thought like this would be a perfect assignment for him to work on this week um and um and he got it working and it um it it does work i don't know if i have i don't know i can't share my screen but i could i don't know how could i share my screen i can i can give you a screenshot you could i mean you if you share i think people will be able to see it because it's just over discord but um we can always leave yeah weird we can leave it as a tease for your desk a lady aida on sunday if you want to it's not it's not oh wait screen hold on oh no it does work okay okay okay Todd Todd says the t in tiny usb stands for tack can you see that yeah we can see that i think people they can't we can't see what wait i can scooch it over and we can see you yeah can you see the it says teen see that the window see i can't see the youtube anyways yeah looks good so um this tester you know it's it's offline right now because of course i just unplugged but it it mounts the it gets the rp2040 to the bootloader by toggling the the boot select pin and resetting it it recognizes the u of 2 and then it copies over the u of 2 in 10 seconds okay which is good um it's not you know the fastest i wish it could be a little bit faster um compared to i do have one idea for you what what um you could truncate the u of 2 smaller because i bet a lot of the end of it is just zeros well you know there's one thing about u of 2 that is a little annoying and that of course every it is twice as big as the binary right so it already is going to be twice is sorry it's just transferring it as a file is going to take twice as long because it takes 256 bytes and packs it into 512 bytes right because it has to have that header right um but i think our build is like 512k right isn't our binary build that's what that's what that's what we're we set the maximum at but i don't know we set the max at one megabyte oh oh right right yeah now this u of 2 i think is actually the right size it's one megabyte but that's twice as big as the 512 which i think is the correct size it's like it's basically yeah yeah so i don't think it's gonna help that much right um i will i will circle back to you know trying this with um you know jlanks with raspberry pies i will try a couple things you know it's always a trade-off of having a solid stake tester versus um having a very fast tester i mean like the qt pie tester for um this our solid state qt pie tester which is a samd 21 takes like again it takes like two seconds to test one board which is just so awesome basically you put the board down it automatically detects you put it down programs it ended it just like blinks a green light and says you're done right and you know it takes longer to plug in the usb but 10 seconds is still quite good um and again i like that there's no um Raspberry Pi involved so that's right that's that that's what i'm kind of going to be working on this weekend try to get the tester done so that on monday we can run the boards i'm a very last-minute person that works out i i think that's a perfectly good way to schedule your time yeah um i mean like why why why run ahead when just i'm waiting on something anyways but um what's funny is i didn't order the pcbs until the chips shipped either oh yeah i got the shipping notice and i was like oh scott take a last look because i'm about to store the pcbs you're like what well that i mean that's why i like i do ish park digi-key order is the same way like i don't do the digi-key order for the parts until i know the ish park's like back from fab and like in the mail to me exactly because it's like you might you know might we'll just like pack everything together so anyways that's that's all i got to to talk about well that's kind of a the cortex party here on my desk oh yeah i mean folks are excited i was i went through a lot of the pr's that we did this week like we did just a ton of rp2040 work plus the usb cdc that dan did um it's shaping up to be a real good the dual cdc is is awesome yeah yeah yeah the cdc is super awesome um one of the things i actually have to do is do i have to write the test script for the feather and um i don't believe arduino has even a partial port of the rp2040 so i might have to do the test program and see um if we had i was thinking about having about doing the test actually in circuit python using the dual cdc and i would use the data only cdc to actually transfer back that the test procedure um data however i i asked tack and he said oh we can't connect we can't write files to the circuit python file system yet because of some like little bug and he said next week he'll look at it but then we could theoretically connect to the mass storage circuit python and actually like drag and drop files onto it right through the teen c mass storage i think that's very weird yeah i think that's what unexpected maker does actually because i think that on his devices he actually has like test log output on the device when people get it yeah but i can't like get the test program on right like i don't want to make a custom weird uf2 yeah has the file system i wanted i wanted to be the clean whatever the releases um i've learned my lesson from that before so right um i'll probably have the tester program run in c and then it outputs that you know the the test success fail on the uart and then as soon as i get the test success fail and then i burn on circuit python i mean here's the thing if i wasn't burning on circuit python if i was just test burned on some neopixel swirl i would save quite a bit of time but i don't think scott would like that he's got one circuit python to ship on the rp2040 i wanted to ship on everything you know this yeah yeah um so mark mark tomlin says so you're saying the feather rp2040 should be in stock next week if the god smile on us should should is the appropriate word i think like no i don't like use the word should or will i say hopefully hopefully there's always you know like i could get i have gotten pcb's actually the pcb's were were mismanufactured so i have to go tonight and verify that the pcb's we got are correct i mean it's like it's very rare but it right yeah well the the other thing folks were joking about is that we would launch it on thursday during my stream next week so if it does uh have some a few hiccups next week maybe that'll happen i put things in as quickly as possible um i you know i do try to have things done by wednesday for the show um great you know keep keep your eyes peeled uh keep signed up i i don't know if we will notify everybody at once um because if we're only putting in like a hundred boards and there's many many many sign ups it's unfair to like notify a thousand people and have them scramble i'd rather notify small chunks right so you may not even get notified immediately on wednesday even if they're in stock but if you if you sniper in and get them that's that's how it is yeah yeah that's what they were thinking of i definitely i know i want to get one or two myself because i just changed the pinouts and it's it's only a matter of time before it confuses me so awesome yeah yeah well thank you for dropping by okay um if there are questions i'll handle those after uh i let you go and have a great weekend thank you for all your hard work i think folks are super excited for like i know we got you are in we got dual cdc we closed our oldest issue which is always super exciting um i do want to get back you know it's just on my desk this the um iamx board i think you know when we're um in a solid spot with rp2040 i think scott you and i want to uh start working on on that chipset bag i mean we got it basically working but like finish it yeah and of course i got those fix some bugs on it we have a couple of bugs to fix but we also you know i got the um esp32 s3 samples in i don't know how how terrifying that is to you well i eventually want to take a look at this the be the belee workflow is the next big thing after this flash stuff yeah the flash stuff should benefit the iamx as well so that will be good yeah yeah um that's what i was just gonna talk about here all right cool all right enjoy everybody thanks for coming by don't forget uh sunday night at lady at a clock uh which is basically like when i feel like doing it um we'll have desk a lady ate us so uh so come on by and uh get vaccinated if you can yeah everybody thank you have a good weekend all right folks the war dropped by uh i don't let me look and see if there are questions uh mark asked the rp2040 chips that you now have are they using a different revision of the burnt in rom image sorry i i don't i don't know that so that's a better question for her i don't know if um i don't know if she would know either but uh so you can ask her uh next or on sunday for uh desk of lady aida um or next wednesday nice david got vaccinated today um hamster says the q spy flash on the pico is chipper ace i haven't checked yet because i got my pico but it seems like something that could be done over swd yes uh i don't think the the uf2 bootloader doesn't usually do chipper ace that's a good thing because we take advantage of that so that if you have a flash if you have the file system in flash make sure that that doesn't get blown away when you upgrade via uf2 so it's a good thing that you a two bootloader doesn't do chipper ace tim says i see cp f2 in the future a fork that doesn't blow it to binary um that's going to be really hard to do there's a lot of good reasons that uf2 does bloat it like it does um basically the way that um david you're so close to me you're in kenmore um my parents are getting their second dose this weekend i think um mark is vaccinated also at they're a paramedic ah that's awesome it's so exciting that folks are starting to get vaccinated i'm like probably the last of the list um because i am able to work from home and i don't have any reason to get it but i'm excited to get it anyway um so uf2 the reason it's bloated is that um mass storage writes in 512 byte blocks and it mass storage makes no guarantees about the order that those blocks are written in so what um uf2 does is it packs 256 bytes of the binary in 512 and then has some metadata outside of that 256 bytes to make sure that you it knows it's a uf2 block and then it includes data of like which block number it is and how many total blocks there are and some other metadata so it it makes a lot of sense the way they did it except for the fact that it's going to be slower because it's bigger um but yeah so that makes sense okay we've got just under 20 minutes um of course if i get uh distracted we'll roll with it um but i did want to talk a little bit about the flash stuff that i want to do um so i'll talk to you just like i talked to dan earlier about it and i was gonna you know what i was gonna fix this for johnny and it's gonna take me like two minutes and then somebody's gonna distract me and that's fine uh so this if you ever do a poll request circuit by don make sure that you check the box that says allow maintainers to edit it we'll see if johnny has that um check out and what's the branch name here patch one so that work yes it did work update state machine make translate get diff get commit add translation update get push perk ah this time it went fast eric asks um can you explain what doesn't get whacked in light sleep aka how does um generation generation do you really want to show your email on a stream i'm gonna generation generation if you want to contact mark i recommend doing it through um discord that's not it got held up by youtube so i'm gonna hide it just because it's otherwise your email would go in the in the recording um do iopins retain state pwms keep running so the idea with light sleep is that it's it will sleep as little as deep as it can while maintaining anything that's going on um so audio playback should continue iopins should retain state pwms should keep running um light sleep is just meant as a it's it's basically time dot sleep except you're waking up based on an uh an event rather than um you're waking up in an on event rather than time um so that's the only reason we have light sleep you can think of light sleep similar as time dot sleep um and then uh yeah so deep sleep is the opposite deep sleep is we shut everything down and sleep is as deep as we possibly can with just the machinery we need to wake up in the way that you want to wake up uh but like your code starts over and all of that um gary z's near woodenville got their second shot on thursday nice that's great news that folks are getting it it's it's just a matter of time patience um okay so we fixed johnny's thing it's up to dated so let's talk flash um omsai if you've hung in with me thank you uh we were talking about um the so there's a there's an issue about updating the build system to ninja which is going to be a huge task um but there's some discussion on it i'm here thank you um so we've we were having a discussion and so here's a question near dox is speaking of light sleep since it basically enables to come out of time dot sleep with a pen interrupt or something shouldn't it be supported apart from deep sleep in order to make it easier to have it on more ports um it still uses a lot of the mechanics that are waking up so not quite it's i think it's better to just join to join the two um okay so there's this big this issue that i really want to move to ninja and i want to move to like python generates ninja and then ninja builds everything and the the thing the challenge that i've posed is that i don't the way that it it's usually done is that you say i want to build for this board and then what you get is like a hierarchy or or a graph of of stuff to build just for that specific case but what i want for our big my big vision of building boards or building uh the software is that i actually want one ninja file that builds for all of the boards at once so that you can have things shared between boards potentially in the future um because there's a lot like think of how many times we compile a file for cortex m zero and that's the only thing it cares about and like how many cortex m zeros that we compile for that it would be nice to share that file for um so that's kind of like where i'm going that's the like multi-year like hopefully we'll get there at some point the more the more recent challenge is flash so i talked about the stop gap i did with just flash sizes for the rp2040 um but there's actually more to it there is um the way that flash gets initialized on the rp2040 is that it loads 256 bytes of instructions that set the configuration variable so the boot rom loads from flash using a very very universal format of like clock slowly and use this very slow way of reading from flash load it into ram and then execute this code if it checksums right so this bs2 default padded checksum is actually the like literally the bytes that get loaded off um and in circuit python right now we just use this default one uh which configures it i believe to be only single bit width so even though everything's hooked up as q-spy i don't believe we're actually loading it using q-spy um the way we would fix it was it is with this um but there's complexity here that i just didn't want to do immediately um the other thing to think about is the imx does a very similar thing um but they have instead of loading instructions off the flash what they do is they load um like c-structs that have configuration settings so if you look in the imx there's this um flash config.c and in flash config.c it has like this table that goes in a particular spot flash size that goes in a particular spot and then um these settings about other sizes and speeds device modes and then there's actually like a lookup table for like commands to run to the flash that tells you how to use it so that is the way like imxrt's also execute off flash and this is the other way that they get stuff going so there's those two things there's also if you the og way that we managed the original way we managed flash is in supervisor shared external flash we have this devices file umsai says it's not super clear about the connection between the flash generation and loading and ninja we'll get there trust me i i'm i think i'm setting this up reasonably well we'll get there we'll get there so what we have here and this is this is the these are the settings that we use for um these are the settings that we use for all of the devices where circuit pipe that lives on the internal flash and then we actually have an external flash that's just for um like the the file system so that's your samd 21 your samd 51 your nrf all use these definitions um and you can see that they have similar sorts of things they have manufacturer id they have capacity they have whether it has sec sector protection or qspy writes and things like that and um that it has the like link to the datasheet and blah blah blah so the segue is is that i want to unify the way that we store all of this information about flash chips um i what i've been thinking about is a system where uh there's a format called toml it's kind of like yaml except it's better specified um and it's increasingly popular so what i'm thinking of this as is that it's a human readable machine readable format for storing data about flash information and the reason that this dovetails into the larger build system work that i want to do is that i actually want to do the same approach i i envision a similar approach for board configuration so a a board says uh i have this particular chip on it right like i have this microcontroller on me and then we have a separate tree that says oh if i'm this microcontroller i have this in here and this in here and this in here um all the way down to like i have a cortex m0 and then like it would know that like if i'm a cortex m0 then i have these particular compiler settings and some stuff like that um omsai says yeah python also has toml for pyproject toml file so it's well supported yep um alvaro says it's like the board config used in platform right out that's true too so one thing that i really want to do is i want to be pretty like this stuff exists but it's never been done from what i could find in a way that's centralized in an agnostic like end result agnostic format um so what i've been thinking is that um mark says this sounds like rest i would love to do a rest version of the rp 2040 uh and it looks like you might be going that direction as well i think there there's definitely rp 2040 version or support for rust already the embedded rust folks are like on top of it and they use um they use uh the svd file to generate all of the bindings usually um so what i'm thinking is that uh i will unify all of these flash config settings into what i'm thinking of as cascade toml so if i had to where's that i just need a text editor so what i'm thinking is that it will be a repository and at the top of the repository will be a flash dot template dot toml and so what this what that will be is a like here's a a the structure of an object to model it after um nwk says if you use cmake you can get ninja support for free and still support make i really i've looked at cmake and i don't get it um i i ran across this thing at one point that said like treat cmake files like programming files and i was like if i'm going to do that why am i using a new language like why don't i just use python um ctt cast hitting toml toml yeah basically um right tiny go uses svd as well um yeah so this is what this is kind of like what i'm picturing so flash dot template dot toml will be a fake version of the final like structure or shape of the of the like flash object that you get out of it and then what you'll do is you'll have like um so these are like what one thing i want to do is like i like to organize things in directories and i was thinking about this in terms of like people who click around source code by following um like links between functions versus me who are like old school and i'm like clicking through directory structure like i wonder how that changes your view of like how things should be organized uh but what i'm thinking is i think it's um i actually want to include i need to look at the mram stuff so we have support for mram which is um modotimus says cmake unfortunately does not stop developers from still writing terrible build systems that are brittle and won't cross compile so this is a this is a direction i've actually gone is like i really want to minimize like thinking towards the build system like i want to minimize the actual amount of logic um and i i would rather go towards a system where it's like tom all day long every day and it's like it's all you're doing is configuring stuff um and then there's a very small python core that does that like translation um like my background with maps is like i was i was when i was at google i was on the maps styling team and like one of the things i worked a lot on was how do you configure what the map looks like um you know given a road this like how does it um how does it look in all these different zoom levels and stuff so i've i spent a lot of time thinking about like what is a what is good way to configure stuff um and so i think that um this is this is kind of what i'm thinking so um memory type so that would be the top level folder and that's flash or mram and then i would do manufacturer and um flash family and then you would have like flash skew dot toml so within every level of this you would have uh a toml file as well so you could say if you had like um giga device you could have a giga device dot toml file here that would set some fields of this like flash template toml thing um and it would those fields would apply to everything like as a everything downstream of it so all the flash families for giga device would have these fields and in fact it would be an error if something more specific to find something at the top level so you wouldn't be able to override anything there would be no overriding it's just at some point you you want to share so it's a way to share but it's not a way to override um so what i'm thinking is that we like i'll convert that like devices h that i showed into a repository like this with a structure like that and then what then what we would need is i want to make just a basic like cascade i think just cascade toml thing and then you would be able to say like flash skew equals and maybe to be proper you would do dash dash flash skew equals gd 25 16 jv or whatever like something like that right so so that would then find the flash skew toml but what it would do is it would kind of start from the highest level toml and like squish them together and then spit you out the squished out version and then what you could do is then you'd be able to pipe that into like a python like devices dot h dot pi or whatever so some like custom code that translates this like toml structure into the like final output so in circuit python land we would have three different outputs we would have the devices dot h we would have the rp20 40 little chunk of assembly and then we would also have a um then we would also have like the imx version of that as well and so the the toml would hold the like the the union of all the different knobs that we need one thing that's weird though is that there are flash related board config so i think this actually gets us starting to do a world um so omsai is suggesting renaming giga device dot toml to defaults dot toml and the reason that i would have this these two be the same name is in case if you do default you might have multiple default files at different levels and if you're open if you have them in your open in your editor it'll be harder to tell them apart um so i would actually i think what i've settled on is that it would actually be there and then i actually do want like this pattern to be also in like a cascade dot toml so at the top level you would also have a cascade dot toml so it would tell you like in the file system these are the things these are our fields um and the reason again this ties into the way that i want to do um ties in the way i want to do build system stuff is that if you look at the existing structure of circuit python there are a number of places like for example shared binding slash bus i o and that bus i o is uh what i would think of as a flag so here it's like all the folders at this directory are values for the the key manufacturer but you need to also be able to say like at this level it's a flag and each of them is a key in and of itself that has true or false as a value um modotimo says they're auto detected it is equivalent of a virtual default um as in if the only file is named the same as the parent it is auto loaded i think any i think you just need a like what is the name of yes that's right right because because you could say what where does flash family end up so yes you could have multiple tomls of the same part but there is a semi manufacturer giga device i mean that's this is the giga device is my example of it i think that's that's me trying to make it concrete so what i was getting at is there's there's a couple flash settings that are board specific which is um even though the flash could do qspy it may not be connected up so we need to know we need to know is it qspy we need to know max frequency because the frequency that you can run flash depends on the traces uh for the board and of course we could also know uh flash skew and that could actually be a list we do have boards that have multiple um how do i designate that flash skew so that would be a list of strings and those strings would map to full objects from the flash toml repository i think um we could put pin out here as well but i don't know if i don't know i don't know if we need that i'll have to take a look so that's my pitch so basically what you what the way that this becomes a build system then is that boards map to mcu's which maps to socks which or skews which maps to socks which map to cpu core and such like that yeah toml is pretty let let me pull it up toml is pretty versatile it's a little unintuitive when you get to the get to the weeds of it one thing that is great about toml is that it does have comments so if you're like why don't you use json well json doesn't have comments um so comments are great and where you're like maintaining this summer soft says it's i and i plus yeah so uh numbers here um strings multi-line strings uh date time full spec let's see that let's see so everything is a key value pair but then you can do what do they call it quoted keys dotted keys are a sequence of bear or quoted keys joined at a dot this allows for grouping similar properties together and json land this would give you something like that so the reason that i want to motor timis says uh comments the biggest problem with json yes and there is a python library um called toml kit that explicitly preserves comments so if we ever wanted to do like programmatic refactoring um toml kit is the place to go and in fact this reminds me i actually used all this toml stuff before in the the election calendar stuff i was doing uh it kind of takes this approach as well um so yeah the reason that i want to do the template is that there's i looked for like toml validators but i do want to be like pretty strict about what the shape of the toml is i don't want the like you you need to be able to verify that like the keys that people like pr in are like valid that they're expected um so that's why i would have a top level template toml which is basically like here's a fake version and like compare this fake version to all of the stuff that's getting committed and like that makes your hopefully like catches a lot of that errors it's not going to be perfect and there's like a pretty complicated toml validation spec as well but um i thought this template it was like we can put comments in the template that says this field is this and this is exactly the way it works um so yeah uh i hope hopefully i i tied it to the build stuff enough but um like at some point i want us to just have this like huge database of like here's a board here's a sock here's all the peripherals and what addresses they are um johnny says so there isn't like a toml schema there people are people have thought about this but the ones the one i saw was like very detailed so i i think i would i would go a little bit like ha ha ha phil says does toml have conditional includes that would make cascading a lot easier no and i don't want it to um the i want to very firmly stay on the data side of things i don't want to have to do conditional stuff the moment you do can get conditional stuff you get this like combinatorics and it makes it really hard to analyze like i looked at css for map styling and the language we had in in the past it was also like kind of cascaded like that and like if you have conditionals you just get like an explosion of possibilities that you'll never actually reach so i think the right balance here is like oh you want to factor something out well you must factor it out of everything and just move it up a level um there's no like overriding or editing it's just like it's going to exist in one place and that's it um but we have this though the only thing the cascading does is it squishes it together so that like something that applies broadly is only defined once um snoot girl says i think that adjacent had comments in the lab trailing commas we live in a better world moda tim says i'm a fan of yaml but you make a compelling argument for toml yeah i did the it's funny if you look at the wikipedia for toml there's also strict yaml which might be reasonable as well but it just is not getting the adoption that toml is um which is kind of interesting but strict yaml from my understanding means that you have to be very like they explicitly want you to to define the structure and types of a document external to the document itself so yeah that's i think that's i think the this toml hierarchy for boards and microcontrollers is this like um this prerequisite for doing the ninja stuff so but then there's also like um and then you would do something similar for like here's here's the structure of circuit python here's places where it's the manufacturer um so you would say like port slash manufacturer and then if you give it a board it finds the board and then it says like oh the manufacturer that board is this and then like you do includes in a similar way um for you do like whether you include files or not based on path um so the the conditionalness of it all comes from file pass basically um there's no if statements um tim says i i kind of enjoyed using open api for a couple projects but schemas are also a way to make more rope for the news quarky points out toml has wide adoption both of python and russ communities johnny says i just invented jammel it's just json with comet support yeah snooker all points out have you ever seen the norway problem with the animal that's funny yeah the norway problem is if you have a value and oh do you mean do you mean boolean or do you mean a string do you mean a country code that sort of thing yeah so i think toml is like when i've been looking at it i think toml is the right balance for what what i'm looking at and it one thing that's really nice is this be this the ability to round trip it as well um like that should not be underrated as well you should be able to ingest it in re rename a key for example and spit it all back out and all programmatically like that's very the fact that it's both machine readable and human readable is really important and that one doesn't stomp on the other is really important so um if you want to help me out uh defining boards or defining flash um i'm not exactly i haven't decided where i want to put the the repo yet since i'll probably do all of this flash work on um ate a fruit time i'll probably put it under the ate a fruit repo but the other place i was thinking about is that the i actually have the build bare metal ninja stuff so i was thinking it might actually be more like this project um that's what i was thinking okay folks we're over time i gotta get out of here uh it's been a pleasure um if you have more questions for me or ideas catch me on discord next week i try not to be on the discord too much uh during during the weekend um so yeah rotary isles up for me and then and then this flash stuff i think um so thanks again to lady aida for joining me if you want to chat with me and a bunch of others um join the a different discord server by going to a d a f r u i t slash discord um these deep dives are usually fridays i don't know why i think the black shirt is confusing the the camera it's adjusting brightness a bit um deep dives usually happen fridays at 2 p.m pacific on all of the ate a fruit streams but the next week will be on thursday so heads up i i know it now i've taken a three day weekend next weekend um so next week will be on thursday so heads up to there we usually start a smidge late because depending on how long john goes um yeah if you want to support me support aida fruit go by going to aida fruit com uh check that out and uh i think this flash stuff will be really neat i'm i'm i'm excited to do a piece of it and see like we could prove a lot of these ideas i just talked about just on the flash side um and then build it out from there if we want and and go from there so uh with that um i think that's it uh i'll have the description updated in a few hours after i take a break and uh with that thank you all and uh weekend i can pet two cats here on the way out let's see cat cam multi cat thanks everybody have a great weekend one cat forever