 one two hello hello there's my other light all right we're gonna take a couple minutes to get going here i'm gonna turn off the streams coming back at me if you can't hear me let me know it looks like it should be working otherwise i'll say hello i apologize in advance for the stuffy nose stuffy nose i have a toddler at home who's in daycare hello biata hello dcd hello sam i'll be delayed probably putting the notes up like i was last weekend i gotta get out of here right after right after this and it's pie cascades weekend which i'm getting excited about i was just trying to figure out what python east as i know that'll be there and uh saw some folks i'm asked on that i'm excited to meet up with hey randall i'll say it again later too but if you're at pie cascades or if you're ever in seattle and you want to meet up reach out to me so that we can coordinate my schedule is going to be a little bit uh busy well not busy i will not be there at the whole thing which is weird for me but that's the way it's going to be usb time hey all hi tyeth hello mira usb host today yeah i figure we'd work on some usb host featherwing stuff in particular i've got some refactoring i think i need to do it's been a kind of a nightmare honestly but i'll get into that i was kind of i do want to do my talk uh i know we saw it last week too but uh what better place or way to practice than to do it live here in the deep dive so that's kind of my plan uh actually since i'm talking about the plan let's start from the beginning uh hello everyone my name is scott i work on circuit python for ate a fruit circuit python is an open source software company about um open source software company based in new york i live in seattle i work remotely for them they do open sort they fund open source software and they write open source software and they also create open source hardware and i work for them for eight years there'll be eight years in august something like that on circuit python which is a version of python a programming language designed for microcontrollers um here's an example this is a cayenne feather um so this is an rp20 40 microcontroller right here it's a little tiny computer it runs at 133 megahertz or so and it's got like 128 kilobytes of ram all kind of self-contained under a dollar for the chip itself the boards are about 20 ish dollars usually although they vary a little bit based on kind of all the other features and stuff that uh is around the microcontroller chip um so ate a fruit pays me to get circuit python running and all sorts cooled little boards like this if you want to support me you can support me through ate a fruit because they pay me to do this by going to ateafruit.com and purchasing some of the hardware there um i yeah that's circuit python that's ate a fruit um i'm scott i go by tanute online i have a two-year-old who goes to daycare and i have a cold from him it's like day two i had a sore throat and now i've got the stuffy nose and pretty sure i kept my partner up to sleep and last night i think she i think she like tried to like jostle me awake because i was snoring and after that i was like okay i can't lay on my back it's worse when i'm on my back so um that's life with a toddler i'm going to pack cascades this weekend so this is what i was talking about um deep dives are usually two hours and that's what i'm shooting for today um where i talk about kind of what i've been working on and also um answer any questions folks have so i'm i'm happy to entertain questions um and do my best to answer them um my kind of two topics for today is i want to i want to do a practice run on my talk um tithe asked how long the slot is the slot is 25 minutes um and that's on sunday you can buy virtual tickets to pack cascades if you want to watch it live but i'm pretty sure they post it after the fact and of course you'll see kind of exactly what i'm going to show on sunday as well um so that was one topic the pie cascade stuff it's pretty much done i did a little a few tweaks but nothing major um and maybe i'll do a little more but i don't know i'm kind of over it put enough time into it and then um and then i'm planning on doing uh i've been working on getting the usb host feathering support into circuit python so um what is that well that it's a separate chip that you can plug a usb device or hub into um so here i have this is called a feathering doubler um so i have the the usb host feathering there's a max 3421 e on here that talks to uh is a usb host and then you can plug a feather here microcontroller to control um the usb bus that you create with this feathering so the really cool thing about this is that for chips that um either have one native usb that we're already using for device or don't have it at all um you'll still be able to do usb host which is really cool um and mira says i have the usb host 2.0 board for Arduino but i got intimidated by the source code and github so i it's probably using this same chip which is what i'm actually adding support for in circuit python so um you could do it without arduino in the future um so those are the two topics uh let me say some hello's and then we'll decide which of the two i want to do first i definitely want to do a practice run um so it may be better to do that first before i get sucked into debugging and refactoring so uh hello dj devin 3 hello dishipu hello c grover and hello ask patrick w thanks all for joining um hello i said hi to beata but again and then hello mira as well um so uh sorry for teasing the usb host stuff but i i think maybe what i should do is just take the next 25 or so minutes and just run through the presentation i was working on last week as a like i think my partner might i might give her the talk as well but um she probably she probably will have suggestions and like i said at this point i'm like i don't really care to tweak it too much anymore dcd agrees let's get your priorities do the talk practice first all right uh let's do that so let me move my secret browser window out of the way and sorry if i'm sniffly or super sniffly i don't feel that bad and i don't have a fever and i also did do a covid test this morning so i know it's not covid i used our last one so i probably actually should order more i'm still here for it great mira awesome i don't have the slides yet what i will do is i am going to try to get the the gotta give permissions again for wayland has like more like screen sharing permissions than usually nothing like co-working stream heck yeah i'm in this office by myself i do have some really cool like neighbors in this building but they're like not even programmers they're all all sorts of things um yeah we should probably defer questions for 25 minutes so uh if anybody has questions do it now before i get started that's a good idea thanks dcd i've designed it to be you know like it's 1280 by 720 is what the slides are any questions before i get going i usually what i'll do is i'll take voice notes as well that's how i time myself because then i actually have a copy of it too i was planning on going to pie cascades tomorrow with the toddler but i read the email from them yesterday and it said that it is uh masks required inside so he's toddler are he's getting better at wearing a mask but he's not perfect so so i was like oh i guess i can't take him plus he's got this cold but he's further along than i am who gets to play the part of the one person who insists on asking a question in the middle yeah we'll see we'll see how the audience should be pretty pretty chummy hopefully just had our covid boosters inserted this morning we're conference season ready nice i got one in the fall and i probably won't get one again until this fall i was thinking that i had a i did a um i had covid a year ago so i also got boosted that way as well dj debon three will you be taking a tripod camera making sure you have your own recording i will not um because this video will be just as good like i could cut this out i i could cut this version out for uh later or sometimes i'll yeah sometimes i could do a screen recording and do it i can't make my own if if i need it um i don't need to do it a lot i like having an audience really to me doesn't add a lot in fact i don't actually plan on going to any presentations for me like these conferences are about like catching up with people and seeing them not not sitting and watching a talk that's not what it's for um which i have to remember is that usually when i'm speaking i'm thinking more about the people that are going to watch it on youtube later than the folks in the room okay let me pull up my voice memo and we'll get started because i don't see any other it's funny it it like tries to uh tries to come up with a clever name for where you took it and i'm like in this building with all these small businesses so it was like some flower shop or something that it said that like where my voice memo had been taken okay bad bar nails that's what it says um okay hello everyone my name is scott uh this is cutting the usb cord wirelessly programming circuit python so uh first before we begin um i won't remove the chat windows this is just a backup um my name is scott i work for ate a fruit ate a fruit does open source hardware and software based out in new york city i work remotely here from seattle um you want to find me online i go by tan newt it's like randomly generated in the 90s but nice and unique um and that's how you can find me online so uh let me introduce you to circuit python and then we'll get into exactly what uh how we're going to cut the cord so uh this is a clue um this is just one example of what a circuit python runs on so here you can see a screen it's similar to i was going to find my pie badge we're going to do that uh similar to this pie badge that i've got and uh on the back we have some key things that i want to point out i'm not going to cover everything um but here's a usb cable or a usb plug so you can plug into it there's a microcontroller here it's the nrf52840 um it's you know tens of megahertz and 100 or 200 250 or so kilobytes of ram and then there's also an antenna here so this uh microcontroller chip can do bluetooth low uh bluetooth low energy which is called billy i will call billy um so this is an example of something that can run circuit python so how do you do that well to get circuit python for a particular board you go to circuit python org um up on the top left you have a downloads link so once you click that you're going to get a whole bunch of boards um there and the top ones are sorted by popularity and then kind of after that it's alphabetical these picots are pretty uh pretty popular so if you want to find a clue you type in clue you get a list of one uh so far we've only done one clue design so we're going to click that one and then we're going to go to the boards page and now we can download a uf2 file so uf2 is a version of the code um you could think of it kind of like this python.exe or c python binary that you run um what you're doing is you're putting that on the other computer the other device the microcontroller and the uf2 bootloader and the format help you do that so we're going to download that and now what we're going to do is we're going to we're going to plug in our usb cable into our hub and then we're going to plug it into the clue and we're going to press the reset button twice um a double tap that will get us into the bootloader the bootloader's job is to kind of like move that original initial binary onto the device itself um this one's super nice the uf2 one is super nice in that it presents a a usb drive so once you're once you've double tapped and you've got a green neopixel or the the single color led will like do a slow fade out but now when your usb is active what now what you can do is you can drag your uf2 file that you just downloaded onto a clue boot in this case so it'll be a usb drive that ends in boot now this file system is fake it just you copy the file over and it knows how to lay it out in the memory of that device um once you do that it will or after that file is completed uh successfully even if it shows you an error if it uh it will reset automatically once it's gotten all the data and on there you'll get a code.py this is where your code lives uh inside the device on the device um all human readable circuit python takes care of all of the execution for you on the device itself um so you got the circuitpy drive now it switched from boot to circuitpy and you also have code.py now if you double tap code.py it'll open your in your favorite text editor i use sublime text and we ship with a default version that says hello world on most boards um it might be blank otherwise um so hello world and if you want to see the output what you need to do is you need to connect over the serial link so serial is like text characters back and forth um and so i like to use to so i've opened the terminal window and in the terminal window i like to um one thing that's nice uh pro tip for linux users is you can do dev serial by id and then it uses the usb name which is really handy uh the nice thing about to is that it will reconnect if you like unplug and plug it back in um which is really nice so you can see here that like i plugged it in and then had they connect to it again so that was really nice if you are connected but don't see anything you should you can control c uh to stop the user code and then control d to reload it so that's what i do here uh i controlled seed and then just pressed any key to get into um the repl this is where you could type in things just as if you'd run python on your command line in a desktop computer but it's running on the device itself not on your computer if you do control d then it will auto reload and you can see hello world appears here so now if we go back to our sublime text we can replace uh world with pie cascades and once we it's unsaved now but once we save um we can see that on the right hand side it automatically reran our user code now it says hello pie cascades so that's a brief brief brief tour of circuit python and sneakily um the workflow of how you use a usb connection to do a number of things that i think that that are required to be able to program circuit python or a device like this so um what makes a workflow let's take a step back first we installed circuit python so that's kind of one piece of the puzzle once you have that how do you get file system access in this case we use that to edit code but we we may ask actually want to like copy over libraries or images or sound files or things like that um so we need general like file system operations not just not just editing a single file and then also uh how do we get our print output how do we do a serial connection those are kind of like the core components of what makes up in my mind a workflow so how do we take this like one example that works really well with usb and kind of expand it and cut that cord so a couple things to consider uh first what devices are we trying to program from um desktop laptop phone tablet are different challenges um desktop laptop obviously usb is quite good for but phones uh support will vary a lot and then also how do you have connectivity to the device usb is one way a cable is one way uh but also wireless is is really interesting so that's what we're talking about today so um here's kind of the three core connectivity options that we have currently um and i've added notes here about like what microcontroller families support those but i won't go into details um i showed you usb already i showed you the usb workflow um and then today i'm going to cover briefly our b bluetooth low energy or blb le workflow um which is really good for kind of ad hoc connections to your devices you don't have to worry about being on the same wi-fi or anything once you're paired um you're kind of connected for for life or hopefully life um one example is like my watch here is running circuit python and it's connected to my phone over bluetooth so good for on the go um especially with ios and android that have varying levels of like like usb support but also just like why would you want a usb cable plugged in your phone all the time um and then wi-fi is also good for being wireless but it's kind of more of a stationary thing because you have this like third device called like the router usually um where like both your phone or your computer are talking to the wi-fi router and then the wi-fi router is also talking to one or more devices and that's really where it excels i think is like you're at home you have five sensors around your house like you can just discover them all and you can edit them and that's great so um when talking about these workflows i'm going to kind of cover the status of them um and we already showed usb so this is kind of there's one axis is like the connectivity and then what you want to do and whether the api supports it and whether we have a solution from desktop and mobile or or like desktop laptop are in the same category but then mobile is like phone and tablet and so if you're using a desktop in a regular computer using usb is really good we have well-defined usb apis for file system access and serial access upgrading is great especially with the u of two bootloader um you can kind of do that from like android and maybe ios but it's kind of sketchy so that's why i said there's partial support there i want to cover wi-fi and bili and i'm going to kind of do this in like wi-fi and the desktop and then bili and mobile devices but the desktop solution and the and the mobile solutions work kind of across as well so like the mobile solution i show will also work with wi-fi and the wi-fi solution i show can work with bili as well all right so the first step to workflow is how do you install it and right now our answer is pretty much you still have to use a usb cable to install uh originally um there is a caveat that like the boot drive showing requires kind of more support from a device a device than um if you just had a serial serial link to the to the microcontroller so i'm going to show you kind of the process that that you could follow to in order to install it without the boot device now this example actually uses the boot device still but we'll see that bili there's like like my watch has a specific way of loading code and that works but there's like no great standard um at least that we've like fully supported for circuit python and then wi-fi same there's not a clear way to like get it in a certain mode in low loading particular code okay so if you want to install without boot the place to go is circuitbython.org so you can go to circuitbython.org i have this other uh code that i'm looking at or other board that i'm looking at this is a esp32 s2 feather it's a wi-fi device instead of a bili device there are other chips in the family that don't have full usb support this is this does but if the board that you have doesn't then this workflow will work for you there too um so if you scroll down you'll see now there's uh for the esp chips there's an open installer link you can click that and it says oh oops you're in firefox oh darn um this doesn't work in firefox because firefox doesn't currently have web serial support so this is a way of uh talking to a physical like a uh a wired serial link um that like that the host to us enables the browser to talk to so chrome is your best bet for um more exploratory connectivity mechanics so web serial web bluetooth for example okay so we're back in we're in chromium now and we have a couple options we can do a full install we could also just update our wi-fi credentials this is super handy if you're uh don't want to do everything for example uh but we're going to do the full install and it tells you a warning that it's new and experimental um and has some caveats about like make sure you're using a a data usb cable because in this flow you're you're doing serial over usb still to do the installation but not necessarily with the boot drive so what you can do is you click connect and then i can never capture this window but the browser will pop out the window with all the serial devices that you can talk to and it grants permission um you might have issues if it's open by another program so like if you have to running already you're going to have to make sure and stop that um this can happen with that but once you're connected up there you can see in the tab there's kind of a like neat logo that shows that it's connected to serial gives you a warning that everything's going to be overwritten and then once you do that it will erase the flash which is what stores stuff and then uh and then it writes a new bin after that it then copies to the boot drive um i think this is yeah so uh browser can also access full folders so you select the boot drive and then it'll pop up a native dialogue selects the feather or the whatever boot drive there and then the browser will confirm that you want to allow the site to have access to that like subtree of of files so you do that and then it downloads the u of two there um and you do the same thing with circuit pi if you're able to and now you can put in your wi-fi credentials um so this is like step one and a half which is like circuit python is installed but you haven't necessarily gotten connected to it or in wi-fi's case connected it to your router right um so when you do the install that's when we expect you to kind of provision the ssid in the password so that it gets on your network as well so you add it there and then it says complete great and now what happened is that on your circuit pi drive there's now a settings dot toml that has these specific keys if it starts with circuit pi underscore that means circuit pi is going to use it circuit python's going to use it ssid and password will auto connect when the device starts to that wi-fi network and then if you have web api passwords uh set it will start an mvns server which is great for discovery i'll show that to you in just a second and then it will also start an http server that has a rest api so that you can interact with things okay so to get there what you do is you go to http no s circuit python dot local that triggers your browser and then your os to do a kind of a discovery process on your network so broadcast broadcast something out that says hey is anybody circuit python dot local um and then all of these things can can reply back to say that oh that's me here's my ip address um this is what's commonly used for like discovering printers on your network and like other like apple tv devices they use the same mvns mechanic okay so once you do that you'll go to a web page but you'll notice that there was actually a redirect for circuit python dot local to the specific devices dot local so all circuit python devices on your network will respond to circuit python dot local and then those devices will then redirect you to their specific one so you get to the specific device furthermore what it will do is the devices can run a slightly different discovery mechanic to find all circuit python devices and when it does that every device will list all of the other ones that it's found when you hit this landing page so it makes it really easy for you to click like circuit python dot local you get any of the devices and then and then from that page you can pick the one that you actually want to talk to so we're going to do that and we'll notice that the url changed and also the you'll see that the the device listed is a different one so now we're on our esp32 s2 that we load in and we want to click the file edit portion we have a weak password protection on that so don't use any special password it's all htp it's over it's like transparently sent over your local network if this doesn't hit the internet but still be aware that it's it's really just a little little bar to prevent easy easy misuse or malicious use so put your password in here i like to use like hello or password um and no username once you sign in you'll get a list of your files you can see we have code.py here but because we're on usb it's actually preventing us from writing or editing anything so what you have to do is then eject in your os and that will tell circuit python that like hey the os over usb is not going to change anything all right so you can there once you reload you can hit edit and once you hit edit you get the superbear bones editor that will work even if you don't have internet if you do have internet though you can go to circuit python code.circuitpython.org and that we have an in browser editor that is actually capable of editing over usb and bluetooth as well in chrome for bluetooth usb i think works in firefox anyway it'll tell you um wifi is a little tricky because you actually have to be on the domain of the device so you can go to the device's name slash code slash slash code slash and it'll pull the same editor up but kind of hosted or downloaded from the the like html stub on the device itself so that the main's right you can do that and you can then open a file select code.py and hit save and run it will do the same thing it'll open up a a split screen with the serial output you can see hello world here i've also changed the left hand side to pie cascade so once i hit save it now shows up on the right hand side again so this is um all the steps that i was talking about uh for the workflow but this is a desktop and wi-fi kind of combination to that and it should work over bilie as well should okay so let's do this for mobile am i doing on time 18 minutes okay so uh now let's do the bluetooth and mobile combination because i think that's like quite popular and powerful so the bluetooth in particular has this tricky bit uh and on mobile that there's no kind of standard api for file manipulation and no standard serial kind of link as well um so you have to kind of rely on apps that do particular things so adafruit's funded and created a few apps to do these things uh file gladder uh it in the app itself allows you to access the file system and manipulate it and do basic editing but it also hooks up into the os's notion of files um which i'll show you just a little bit but that allows other apps to just edit a file that is kind of like it doesn't have to worry about how to like manipulate it it's available on android and ios um but i'll show you the ios version here so click glider and now you have a list of devices that you've already connected to but if you want to connect to a new device like the clue that i showed earlier when you do the double tap you got to do a slower double tap so what happens is like the bootloader starts and then circuit python starts and it'll do a yellow flash which is safe mode and then after that it will do a blue flash so you reset during the blue flash and then that resets the whole device but there's some state that it can tell when it gets back there and that will be in a kind of pairing discoverable mode now it is uh like less powerful than normal so you have to make sure you're real close to the device and that's meant as a another little hurdle to just like prevent somebody from across the room being able to connect okay so back to glider you'll see that there's a new device discovered you click that and then you can hit pair this is kind of like giving it additional permissions thanks dexter once you give that extra permissions you can now list your file system you can see code.py i can load code.py this is kind of just what i saw and then if you go back to your files app now you can hit you'll see there's a glider location once you hit glider you can list your devices and once you click your device you can list the files in the files app except for the fact that there's a bug and it doesn't work right now unfortunately so um you'll see that's kind of a theme of these newer ways of editing circuit python so but that's file glider let's talk about the serial side of things for a second we have bluford connect which is kind of a generic swiss army knife for bluetooth connectivity devices one of the things it can do is a serial connection um and so you can hit bluford connect it's going to give you a bigger list of devices but if you find yours you can click it it'll have a circuit python option once you click circuit python you'll get you have a sign of blank screen syndrome again because it doesn't necessarily know that you've connected to the serial so what you have to do is if you click the text box you can control see it and then control d again to kind of trigger circuit python like hey i'm here um send me stuff um so here you could see that uh i interrupted some other code that was running um last up uh and i'm i'm running out of time so i'm breezing through it um pi leap is a an app that we have that's kind of like get meant to get you over the blank code.pi syndrome so a different has a learning system where there's a lot of tutorials and guides pi leaps goal is to get um a whole kind of project onto your device for you um and it lets you browse it you'll notice this is a gif that's because i actually ran into a bug when i was using it too which i think uh is close to fixed or at least our our dev is working on it um so keep an eye on that as well okay so that's an overview of kind of the the different combinations of programming circuit python and doing it wirelessly um if you want to know more about how this works under the hood my first pointer is to the workflow documentation page where it will go into more details about like how all of those different functions are achieved over different connectivity standards um my goal has been to like kind of meet people where they're at so like use like if we're doing ble we're going to do it the ble way if we're using like network we're going to do it the network rest in my mind way um so ble does like there's a standard serial service card Nordic UART service we do that but we change the unique IDs just so that the user can also do a serial service and then we've created a custom file transfer service that's meant to be pretty easy to implement um web workflow uh there's mdns for discovery like i talked about that's the dot local and kind of finding other circuit python devices there's an HTTP API for file access and then there's also a web a web socket that you can connect to for serial access um if you want to help us out here's the app source links um i'll have a link in just a moment to the slides if you want to click through to these but they are all open source that's kind of Adafruit demo so where are we at so um here's our full matrix installing and upgrading is not really supported wire wirelessly over wi-fi and ble um but uh usb is pretty solid for that and provisioning um print output over wi-fi on mobile is kind of like i'm not sure how that would work but generally we have that although if i'm to be honest a lot of this is still really uh new not used by a lot of folks and pretty buggy so love to have your help love to see folks use those apis under the hood that's why i've broken those out here they should be relatively more stable than the apps but um you know if they don't get used they they can rot so i would love your help to use these ways of programming circuit python please report issues we do want to make sure that they work well um and that they continue to work well and if you have ideas about tooling and apps and ideas we'd love to see those so that's wirelessly programming circuit python thanks to antonio and trevor for working on the mobile apps thanks to melissa for all of that cool code dot circuit python dot org stuff and also thanks to liz blitzity diy for testing all of this stuff and really finding lots of issues here's the links circuit python dot org and the link to the slides if you want to click through some of these other links um that's it 25 20 bad bar nails all right dexter thanks for the time codes uf2 does have ota update support it's just not in circuit python yet how does he i i know that there's yeah there's the u the tiny uf2 bootloader has two partitions move the app links to the end after where your roadmap site is so we have so you have more time just the the app source i do think that is in a little bit of a weird position i agree with that and i did hear from the code of conduct folks you think it's after this bug slide is where it should go i think that makes sense from the like call to action yeah okay that'll work tyus has smashed it dj devon do you don't have bugs in circuit python just happy accidents yeah right that's patrick devy says okay you yeah move the links mark says good job this reminds me i have to play with bilian wi-fi workflows more as i have devices that could use both see that is exactly why i wanted to give this talk last last week timon was on and he was like i didn't know you could do that so like that's why i like this talk is that's that's my goal with this talk my goal is to be like hey we have this you should use it you should try it i know it doesn't quite work all the time but we want to make sure we want to get it to the point that it does and we can't really get it to the point that it does until we have people regularly using it thanks timon definitely know more now yeah i mean i know it's the same as last week but i wanted to practice it one more time i feel pretty good about it like even the first time i ran through it i think i ran through it on i didn't i went over it last week but i didn't run through it and then i had like we had a meeting that ended at four and i had half an hour before um half an hour meeting before show and tell on wednesday and i ran it through in that slot and i was like yeah that worked pretty well um the timing was pretty good so yeah i feel pretty good about it pi leap looks exactly what people need i'm afraid of leaving people to fend for those themselves with a lot of this stuff yeah totally and there's more integration we could do where like we have the project bundles now with um on the learn system like maybe if you're on chrome we could actually like download it straight to your device and timon missed half of it last week biata says once upon a time there was obex for file transfer linux still supports it apple couldn't say obex i did look but i never really saw anything it was far more refined than last week excellent presentation representation of how circuitry really is great thank you i did practice it on wednesday that was not my first run through although that might be my last run through i feel pretty confident with it i'm not worried you know i was like 20 seconds over time i will probably talk faster talk faster and forget stuff on sunday it's just how it goes hopefully i feel better felt like you got it sweet all right well that's it i should i don't even really need to think i need to re-render it because i'll just do it from the browser here and oh i guess i should push it because i'm going to do it from a different computer i have it last time i did the pdf but i failed to push it um have a phone watch clock timer or something you can see if they do not have one for you i do the same thing actually that i just did i usually just voice record myself even when i'm giving the presentation let's just use it as my timer right like winter recording it tells you how much time it's been recording then i figure out how to make the pdf smaller i did not instead i set up lfs which is large files um which is a git thing so it actually doesn't store the pdf in the in the git repository when it gets that big it stores like a placeholder but then there's like some code there's git lfs that will just like transparently get the file for you anyway um so i just set that up instead it the other reason to do it earlier is like getting a little more tired of talking after talking for 25 minutes should we switch brains so usb host usb host feathering if i close my browser i did one giant jpeg and then zooming on text i'm really not a fan of jpeg because of the artifacts that you get with like around text jpeg's design for pictures like photos not not graphics like i think it's a vanguard it looks like they made this better but this yeah this image is like pretty well like pretty poorly like edited it has all these artifacts and stuff i was like uh yeah jpeg goodnight dishapoo thanks for stopping by sleep tight so this is the ate a fruit usb host featherwing which i showed earlier and what i've been trying to get support in circuit python four um i wanted to do this in the fall when the product came out but um as folks know i was busy with my mom being sick um so it's been a minute that this product's been out but we don't support it in circuit python and it is something that we want to do so i've been working on it it turns out it's harder than a harder than i thought it would be at the start and i uh can go into why today so um like i said the idea is that we can take pretty much any feather plug it next to this host featherwing or the host feathering can go on top it doesn't matter the nice thing about having it on the doubler like they have in this picture and i have here is that you still have access to the top of the feather itself so uh yeah so this is a separate chip called the max 3421e that is connected over a spy link to the host microcontroller so it uses like spy transactions to do register reads and writes and tiny usb's added support and tack like this demo is a in arduino example so tax got networked in in arduino and so i'm crying i'm coming along and trying to get it working in circuit python djdevin3 says i didn't know it wasn't supported in circuit python yet oh yeah it's not there's an issue that uh has been open for a while that dan and i were going through issues and be like oh yeah you should assign that to me i'm working on it um and then david points out that there's a top secret cutie pie version coming out as well um which is like a smaller form factor board that has the same chip on it um it actually um is really popular adafruit's not the only one to do it so if you look at like um spark fun usb host uh like this usb c host shield um has the same chip so like this is kind of the only chip that i know of that kind of works this way where you can have it connect like have it from another micro controller so it's it's not new the chip's not new it's kind of been around for a while but this our desire to like make products with it and and support it is relatively new so um what does it take to support it in circuit python well tiny usb added support and um in circuit python what i'm doing is i'm adding a new um i have a code to pie right here so this is what you do in circuit python this is my test demo which i don't have i shown this on the deep dive yet i don't remember i know i did pie cascades all last weekend or last week i don't know if i did it at all i've shown this on show and tell the last three show and tells but i don't know if i've talked about this for a deep dive at all um anyway so what you'll do is you you have your board spy and then you also need a chip select and an interrupt line so the interrupt line is a separate line that says like hey i've got i you need to you need to do something with me um it's like very similar to what happens internally it's just uh each show and tell improved progress yes it did i've been making progress but it's been more of a fight than i really care to do um it's been a lot trickier than i thought it would be originally and it's largely because of this spy bus right so spy buses are shared buses where they have uh data in their data out data in and a clock and then what you have is you have a chip select line and you can have multiple chip select lines so you can connect the data lines and the clock line to more than one chip and then uh you only have one chip select line active at a time um that's great except it makes it really complicated when uh for you have this for example where it asserts an interrupt says hey you gotta talk to me but you might actually be talking to something else already um and that's kind of the rub of why it's been kind of like tricky for me to do um and yeah so what you do is you set it up as a host chip you just leave it there which i'm like i was thinking about whether i like that design or not so this uh and then the import usb this is the host api and it's implementing the same a subset of the pi usb api that you would have on like linux or mac um so you can say i want to find the devices you say for device yeah so this is like if you saw my show and tells this is the code that's running in my demos on show and tell so you print finding devices and then you iterate over device that you find when you do usb core find find all and then the device has some properties on it like it's vendor id it's product id and then it's manufacturer and product names so these are strings um and they're fetched the manufacturer and product id are fetched on demand whereas id and vendor vendor id and product id are kind of fetched on when when they're connected um djdevin3 says this must have been what you met in dev chat where you're talking about spy working as an interrupt which sounds wacky yes this is what i was talking about so um i've been using like the reference implementation so to look at tiny usb you can go into examples host bear api this is very similar to uh kind of what my circuit pythons doing where um bear example board in it ta task that's how i think of it in my brain tiny usb host task um you call repeatedly over and over and then um you'll get some callbacks from tiny usb and you want to print when a device is plugged in you want to print information about it there's more stuff here but you'll notice that like id vendor and product are in here and then it has to do separate calls for the manufacturer and product that's what my example code will trigger too um except there's configuration descriptor stuff i don't know what it's doing hid stuff so this example is kind of like the tiny usb side of things and then there's board support um so if you go in hardware bsp and then the last one i was doing was rp2040 so if you look in here in family dot c this is shared kind of like amongst all rp2040 example code so this is not kind of part of the library itself but it's part of the examples in my brain so circuit by then doesn't use this code but it's code that we're looking you know we're looking at as an example of how to use it so here's how they get everything set up and you can see here that it calls if you have it configured to use the max 3421 which is that chip on these boards it will call that a knit on it um and max 3421 a knit is actually just down here so it's doing like interrupt chip chip select and interrupt pin setup and then setting up a spy bus right so they're they're not they're not sharing a spy bus they're just making one dedicated to it just part of why it's been so tricky it's because like like tiny usb didn't really account fully account for like the idea that it could be shared so i fully expect that we're gonna find more bugs before it's like really solid um one thing that's also interesting is that this interrupt line is actually hooked up to an interrupt so when the line falls down like you'll actually get a cpu interrupt that runs this interrupt handler which it checks to make sure that it's the right thing that caused it and then it runs this tiny usb host interrupt handler thing um this is pretty standard for circuit but or this is pretty standard for how tiny usb works and usually it's okay but the the gotcha with the gotcha with the max stuff is that it still does spy transactions whereas it usually would just do transactions to the inner internal usb and that's okay because it's not going to be on a shared bus but with spy it is dcd said so so how are you sharing the shared serial port resource right so this is this is the way tiny usb is doing it so to in or in order to implement so uh there's three api calls that you that's what you have to do three api calls and really kind of four in order to like in circuit by thumb that i have to do so that tiny usb works with the max so first i have to give it a way of setting the chips lifeline either high or low i have to give it an api for disabling or enabling the interrupt pin so it's already set up but i might it might want to turn it off and on so it doesn't get interrupted and then lastly a spy transfer api so this is the api that tiny usb will call in order to do the spy transaction um and so so this example is just using the pico stk directly and it's not sharing its spy initialization at all it's it's specific to that so now let's pull up um circuit by fun so ideally what we would do is we would say um in shared well let me just show you so in shared bindings there's now a max 3421e module which i have not documented yet so i should fix this is one thing i could do on the stream in the next hour is i actually need to go over this stuff because it's not right i forget what i copied it from i think four wire actually um so this needs to be updated i haven't updated it yet i've updated this stuff so you create it with a spy bus you give it chips chip select line and an irq line as well and you can change the baud rate and then a calls into this common how construct which is to like totally common circuit by fun stuff it has a d in it object so this is something that i asked tack to add was the ability to actually turn it off like so many vendor stks don't have this ability but in circuit by thumb we actually turn everything off between vm runs so that you kind of start with the same state so we have a d in it and you may have seen discussion of finalizers so here we're doing the allocation with m new object with finalizer and what that does is like if i set the variable name to this object and i say delete that variable name what it will do is i say like okay you can no longer use this thing and then when you do a gc collection it'll come along and delete it fully and when it deletes it fully it will actually call what's this like dunder double underscore delete method will be called on the object to give it a chance to kind of like fully shut down before the memory goes away so that's what finalizer does and all of those finalizers also run at the end of the vm so you're kind of like assured that that you'll be d in it in circuit python like python the language doesn't tell you when that dunder delete will be will be called so in circuit python we have this convention of having a d in it function as well that you can call and it will happen immediately when you do it so you know when exactly that that d initialization d initialization project process will go and then your d in it will just check to see like if it's already been done it just doesn't do anything so that's kind of the api and it's a little i don't know this is i'm waffling on this like should you have to pass this to something else to say that you're using doing usb host or not um did you say that just the spy serial was shared or could the interrupt line potentially be shared i think yes sometimes you have the interrupt line shared um i think it would be okay to have like usually the way i you share an interrupt line is that like it's pulled high and everybody sets it to zero as they need it um so yeah in theory you could share the interrupt line as well um and then you just have to make sure that you like you would have to check all of the devices that share the interrupt line in that case um i guess i'm assuming that it's not shared in this api i'm taking it in as a pin so if i wanted it to be shared i could do it as a digital in out or something but i'm just doing it as a pin so the way i'm implementing it you can't share it but in theory you could the reality is is your the way the code is now you're not going to be able to hook two up there's not a lot of reason to hook two up because it you can actually have a hub um if you want to connect multiple devices you don't need multiple feather wings you would just do you would just do um you would just do a usb hub so on the doubler which wires go between the two boards does the learn guide come later i think there is a learn guide already but the doubler just connects the the boards in the same way as if you just put stack them on top of each other um so it's kind of like the default setup it's kind of the default setup that d9 and d10 are irq and cs but you can cut it if you want to change it i think is what it is so that's the kind of like how do you initialize it from circuit python and i got to fix these docs these docs are wrong um and then the implementation side happens in shared module because a lot of this is kind of standard stuff so in shared module you can see i have some leftover esp logging that i will rip out eventually um but like it's not working perfectly yet so uh you construct it you say oh if it's if the host is already initialized you just raise a an error um if you already have one active you also raise an error um will it work with the usb host feather no so the usb host feather is set up to use the rp24 days core in pio to do the host stuff um and and i should yeah that's not that's how it works but the reason it can't work with the host feather is because of um right now tiny usb only allows you to have one host implementation active so the way that tiny usb switches between host implementations is like they all implement the same functions with the same names um so if we enable max 3421 we can't have host support from anything else so i don't think we'll ever like the imx rts we well maybe but the ones with two usb ports will probably just use the native usb host um but maybe on the lower ones that only have one then like we could have the device stack for the native one and the host stack for the max that would be okay um but we can't have the pio usb stack next to the max pio usb host stack next to the max 3421 host stack currently it's not structured like that so so no my goal has been to get it working on the um the reason i want to add rp20 support rp 2040 support is that um there's the dvi feather rank or the dvi feather so this is the rp2040 with the dvi output so the dvi outputs really pretty hungry too it also takes the second core so your the reality is you're not going to do pio usb but you could do a usb host feathering so i want to make i want to turn it on turn on max 3421 support in the dvi feather it's my goal so that you can do dvi output and do usb host which i think would be which i think would be cool um okay so we're actually just using digital in-outs for our chip select and our irq uh to to initialize it and then we have a separate init irq call that is port specific so this we don't have an internal api currently for like call this function when this pin changes um so that's why there's this there is some port specific implementation that has to go on here and it's like surprisingly difficult although i think what i'm going to do is factor some out some stuff out so once we do that we're good we can turn on uh the tiny usb host stack and a knit it we just a knit at two i i set a variable name somewhere i'm gonna have to look with this fresh eyes next week my goal is to get this checked in by the end of next week um and then we have a d in it a check we just set bust null if it is and then in d in it we d in it the interrupt we d in it the tiny usb host stack and then we reset the pins actually i wonder if we should d in it instead of calling reset we d in it since we're using digital in out to create it and then we don't need dot pin and then we're good we set the bus to null and we set the active shared value to null as well ah yep jebler did a rp20 40 usb host and a feather dvi to create a cpm emulator but it was Arduino oh and he he must have had like a serial link between the two okay so here's this api that we have to implement for tiny usb so chip selects api and it says active or not active now this is where we do bus locking but we actually don't have any way right now to tell tiny usb that we can't lock the bus so we kind of like what i'm finding is we have to preemptively like not call the things that assume that they can lock the bus like there's a separate bus locking internal to tiny usb as well for this it's just tac and i are working on it still anyway so this is what it does um when you want to set the chip select we double check that the spy bus is still in that still in it there's a caveat here that when finalizers run they find they there's no specific specific order so the finalizer for the max 3421e might run after the spy bus is already torn down or de-nitted so you got to check for that um if it's active you want to make sure that you haven't already locked the bus um you try to lock the bus and if you can't do it you just you're done and you don't say you don't store that you have the lock otherwise you you did manage to grab it you configure for your blot rate and then you set your chips like low and then uh if you're doing the reverse you if you're not active and you've locked it then you can set the tip select back and unlock the bus um that's pretty straightforward transfer api um you check the spy bus again and then depending on what buffers are set you can call read write or transfer um transfer is almost that except um we have separate api so that you can provide like what the byte is that if you're reading what byte gets transmitted as you do that um and then there's this api for enabling and disabling and it calls out to the port specific version after checking that the spy bus isn't it so what we have to implement per port is pretty simple it's all just this interrupt stuff but um it's like surprisingly complicated because the interrupts could happen at a time well on expressive on expressive you have free r-toss and with free r-toss you have a bunch of tasks and the the pin interrupts so let's just start there i did get it working i showed that on show and tell so to find port specific implementation stuff you go ports expressive common how and then the module name so here's the max 34 21 e so we actually have to create on expressive a separate free r-toss task that runs the tiny usb task um because that's the way tiny usb's worked if it's in free r-toss mode um is that the tiny usb host task will um good question so tomon asks does circuit python have any form of concurrent execution at the moment um like when it's not run by an r-toss so yes so in expressive we have free r-toss tasks we do have some concurrency um but the concurrency that you have to worry about is twofold and kind of for circuit python itself um one is interrupts so interrupts can still happen at any time that you haven't turned interrupts off which you will see and then um second is we have this notion of background tasks which are um like small chunks of work that we run want to run it's kind of kind of like a co-routine i guess but it runs on the same stack as like the main circuit python thread um and you'll see calls like if we look in common how busio spy and transfer you'll see that like while we wait for the transactions to finish we call this run background we do this run background tasks macro so we have a linked list of like function and data pairs that we call in as background tasks um so for everything except expressive like that's when your your tiny usb device task and host tasks will run is when um an interrupt happens say like the usb device says hey i i need to run uh stuff it'll run the interrupt handler tiny usb stuff immediately that will queue up stuff that gets run in the task function instead um so on free r-toss there's a separate actual task on um everything else there's just uh that interrupt will also in queue a back a background task um that circuit python will run later um whenever this happens and this happens also so so you'll see it in common how implementations where it's going to be take a little while to to respond so like spies relatively slow and then um they also happen every opcode of the vm like every time the vm goes around its loop it also will run in the background tasks um are those guaranteed to run in a certain interval or is it best effort whenever you're free um it's kind of like a bit of both it's not guaranteed to run quickly but things stop stop working well if they're not um so yeah you kind of have to manually decide if you're if your execution is running long enough you have to call you have to add this run background tasks thing and it'll do you do it for you um which is another gotcha so because spy calls it um and expressive so going back to the expressive simplification and even it's even weird in tiny usb so um you have a new host task that's okay fine um but you also do so i just piggyback on this init irq call to actually create the host task i don't want to create the task if i don't need it so i'm just doing it when when the init irq is done so i create a new for our task task it allocates stack memory and blah blah blah so i might fail um and then i install the interrupt service and if that fails i delete the task because i don't actually need it i failed um and then i add this handler and this handler gets called actually by a different task and this different task even in the doc says like this task doesn't have much stack and turns out that like doing all the spy stuff kind of like makes the stack long enough that it gets too long so even tiny usb they have a signal that goes from the actual interrupt to another task that then calls the interrupt handler for tiny usb um like the goal is to call the goal is to call this tiny usb host interrupt handler with your instance number when an interrupt happens but on esp you don't have enough stack space to actually do it from your interrupt itself and so i'm using the background tasks method to schedule the interrupt handler call um in the circuit python task so on the real interrupt handler we say add this um callback to the interrupt callback so that's circuit python's internals and then i also disable the interrupt for now um because the interrupt is on the low level so there's a period it it goes low when it needs to work and then it's going to be low until you get back to it and then it'll go away um but if you miss that falling edge you might actually like never get to the work so instead i have it say like if it's ever low then you need to do this blah blah blah um so on the actual interrupt handler add a thing that might try to run the the real real real interrupt handler um but ignore it if it's not initialized um now try to lock the spy bus because we actually know that this this tiny usb interrupt handler is going to try to do spy stuff and it's not going to be smart if it can't get the spy bus so only do that thing if we know that it can actually add it if it doesn't so try to lock the spy bus if you're not able to then add add this function again to the list of things so like the next time run background tasks happens it'll run again um and then if it was able to lock you unlock it so that this interrupt handler thing can actually use it and then once that's done you can turn the interrupt back on um which is like dancing around like free r toss and like making sure everything coordinates well but i think this is actually what i need to do in all ports so i've been having a lot of trouble getting it running on the rp2040 and i think it's kind of the same reason um to one says but sounds like you could eventually use some concept of threading behind the scenes eventually sounds quite complicated to maintain maintain things that have real-time ish needs like that especially ever have multiple things like that yes yeah and i was doing this work and i like i don't know if folks saw but maybe it was on the internal slack but i just said like i kind of feel like at some point we're going to adopt free r toss for everything um i'll tell you i worry about managing all of the different stacks and their stack sizes to do that um the nice thing about this background task thing is like you don't need separate stacks you just do a little piece of work on the existing stack um so i think we'll get there but yeah when you disable the interrupt should that be before adding the interrupt to avoid low level retriggering well this i know when i do this background callback ad i know for a fact that the background callback won't happen um i don't know if i actually know that on non-esp ports i know that because an interrupt is happening in the same stack as the current circuit python task um and then yeah it's complicated i i puts it a thing that says i puts the thing like concurrency is complicated and this is exactly why like people want like interrupts and in concurrency and circuit python and they're just like it just gets so much more complicated someone says i'm holding myself back to suggest zephyr i know zephyr's on a radar it's one option the problem is zephyr is it does way more than what we need it has way more tools than we need um like all we need is an r-toss we don't need a how we don't well we want a bluetooth stack but like we don't need a build system we don't need a configuration system like no you can cut it down pretty well i don't have the background but i'm going to the zephyr developer summit not not next week but the week after so we're working on it we're working on it i think i think jeff dan and i have kind of assumed that we're gonna do it at some point and i think one thing that's really gonna push us that direction is as we as more boards come out with multiple cores like the rp2040 is an example like it just makes more and more sense to use an r-toss to manage multiple cores so i think we'll get there it's just might be like circuit python 15 we're definitely going that direction like we're evolving there like circuit python 9 and introduce this idea that we have a heap that lists that lives longer than the vm's heap like that's new to circuit python and that's that's gonna have some impact with circuit python and implementations in circuit python that that are evolving us more towards that way and it you know when we have free r-toss with expressive that that's really nice the other problem with zephyr is that um we support a lot of different vendors and they know they're not necessarily supported across all of things that we do we interface with a lot of different stks arm mixed with risk 5 is really common with lots of upcoming chips which i find interesting yeah that is interesting this is why my why i have a interest in build systems the yeah multi-archs sounds like even more complicated yeah i'm curious to see where they're at like i'm gonna meet up with the tsc folks and like i was i realized it's been over two years since i've been on the tsc which is the technical steering committee of zephyr so i like had pretty deep knowledge or interest insight into like the leadership org and the reason i got there is because it's pay for play like you pay enough to be part of the zephyr foundation and you get a vote on the technical steering committee but yeah i'm curious to see where they're at because it's been a minute since i've been in those meetings um okay but i think this is basically what i need to do um for all things because i was still on the rp2040 i was still having this problem that the interrupt can happen even when i'm doing something else loads more vendors joined too i'm in particular interested in expressive because i really like their approach for like the nimble and the nimble and free r toss so i yeah we're doing a lot with expressive so that matters okay so i think what i want to do today and i still have this stupid cursor bug but i want to factor this out i want to factor out um this kind of delayed uh interrupt handler call because i think i need it i think i essentially need it in um all of the ports because i'm like having trouble getting the rp2040 working so i think i need to actually just just make it standard load up a 700 megahertz risk 5 64 or turn on an arm core 256 mega ram version of the milk five duos have been shipped to me waiting for them to get to the Costa Rica neat buying the hardware is the easy part but software supports the hard part so i make the big bucks software supports hard okay so i'm going to factor this out i'm gonna say i wonder if we just make this i'm gonna move this from here to the shared module because i want to do it all the time it's just gonna make it simpler like this this delaying stuff is not um port specific okay and now we buy buses free and i guess we could make this let's make this self to be clear we might have to put a like super thin wrapper around it for the expressive version okay so now i've factored it out and it's doing the interrupt handler in self but i know that the rp2040 version is not that nice it doesn't it's interesting you can do a callback but you can't give it one piece of data that it also gives to you so you have to manage it yourself which is okay i know that i move this off for a second it's like quiet i'm not in my directory myself an expressive mode just bought a max instances set to two for max 31 and super that mean dual feather wings port uh that's not quite what the define is it's the instance number i don't know where it's used at all but tiny usb has this notion of root hub root hub port in theory because you have like more than what you could have more than one oh so i i did tiny usb doesn't allow you to have multiple implementations of the host stuff but it does give you this rh port parameter in case you have multiple instances of it um so i guess there is this world where we couldn't theory have two max chip yeah so this is what i was worried about is that it's complaining that the pointer is incompatible it should be void pointer instead of that um so what i'm going to do is just add a super simple i thought we got rid of all these capitalized statics but maybe that's a micro python thing we didn't do yet um interrupt big star just casting it like we know what it is i know you don't know really wish they'd fix that cursor thing for me but they're ignoring me i let them close it that was my problem i let them close the issue and then i reopened it and nobody paid attention to it handler one case and wrapper in the other okay so should i test this i kind of don't you like it i gotta test this more anyway i think what i want to do is actually get it i'm i'm gonna do the rp20 40 version i'll just make sure it compiles but i i want to see if i can get rp20 40 working yeah see here you see how it's getting rh port that is the what instance of it are you thinking dual feathering support i'm not making i'm not making that work there's no really reason that you want to do it is that true you're going to be limited by your spy wit your spy bandwidth anyway so i guess you could use two spy buses just use a hub just use a hub if you want multiple usb devices just use the hub that way you get power as well i would like to get to the world where the pointers oh you know what i wanted to find my pie badge too maybe maybe if rp20 40 works i'll have time to do pie badge because it's a mask's required i was thinking what i should do is just put my picture on my pie badge how does it even support multiple devices as in multiple of these chips it i'm not trying to do that in theory you could by like reading the rh port and mapping back to an object i'm not doing that rh port should be carried through but i don't know if it's really tested at all okay let's do a new tab i want to try the raspberry pie sign and i should push this too just so it's a fun github i just think if i get sicker and i have to work from home i can like ssh in and push things to get help but generally it's better than those have it backed up okay so in here you can see i'm doing this max in handler again and it is a little annoying that like the ad raw irq handler here doesn't set anything um oh and that yeah that makes sense we're gonna need another wrapper here and then rh short for an rh port i think it's root hub root hub yeah background scheduler we want share the implementation too background scheduling on esp won't do anything it'll be fine like it'll run the background thing again but the background thing doesn't do anything okay we do want that we want to get it active missing cursor is so frustrating wrapper and we have it in multiple places okay you might want to handle more end points than are possible with a single ic but that's a pretty involved application yep that's true i haven't thought about that not only my pie badge but my i bet it's in pie badges are sandies right i bet it's just in my sandy box sandy 51 i bet that's where it is usb background schedule i think that's just probably should have taken our allergy pill there we go all right my usbc cord here's one i have two usbc cords over here and i have two micro usb ones that seems to get me by no anything bling boot cell we need we have more basic requirements for usb host than that many end points right now finding devices let's plug in my test keyboard hey oh and is it still going it is that's good news now let's try the control c test oh it's still responding see there's debug prints but that's okay yes i will take that sweet okay so that's working too and i think i want to just do nordic the same way i thought nordic was working well but i wonder what i did we renamed this folder recently if it it seems really it's called that it was renamed so it doesn't know yeah i'll tell you i had the opposite of that earlier this week because of the stuff i think i do need to do the same thing i'm basically guarding the tiny usb stack from getting a case where the spy is busy by by moving the host interrupt handler into that background task and then checking to make sure that they can lock i'm protecting tiny usb from that i do want to do that i have like this is part of my challenge like how many different uh copies of this one file do i have open that's part of the problem with that naming convention so instead of doing these two things i'm gonna do the max interrupt handler with active i have to keep track of which one the active one is and i could guard more but kind of lazy kind of done kind of friday i'll push it all and then i'm storing the keyboard across the room in frustration no that wasn't my reaction i was pretty much like i'm done i'm going home or like what other fun things could i work on i haven't played video games this week that's kind of been raising up in priority like i need i need some some easier wins multiple definitions of active i'm just gonna make sure it compiles there we go the i i've been doing esp so long i'm like i build anything else i'm like whoa that went so fast rp2040 plus airlift featherwing plus usb host featherwing would work why you want wi-fi and dvi in a usb host like i really don't like the airlift stuff let me be honest if you need wi-fi use an esp chip is my opinion i i should clean this up but i don't feel like let's get our merge supply merge going i'm just gonna commit it push it i gotta clean it up next week i don't feel like it and i do actually want to take a quick peek and see if i can't find my tiny usb update i think i want that i'll double check but taking this stuff out makes sense change that oh this is a tricky one this dash linux on here was what was causing a linker error i don't actually want it on the regular feather of 2040 this is also why i like this a lot oh i turned off the spy background things i should test it with that but i think it'll work now i certainly don't want to commit it and then there's this one removed by rq too many wings and you get pink pin conflicts that's true too did you see the at commands for matter setup made sense but also my heart sank no checkpoint on success true true true true checkpoint on success and also when you just are about to leave and then i just want to switch to get log i think that's right like that's origin master that's really new like yesterday new i think that's right we're on the leading edge of tiny usb for all this stuff as i code attack and be like this doesn't work have you thought about this works on rp2 okay so if you want to try it over the weekend i don't even remember it's a nice thing about auto formatters um this will be pushed to my max so if you want to do that it's pushed did i push my presentation i think i did yeah okay great uh we have 15 minutes if folks have questions uh put them in the chats i'm going to just grab my samd 51 box and see if my see if i can find my i i used to have just a pie badge with a lanyard for for conferences and i need to dust that off or at least find it for this one i found pie badges but no lanyard zap everything i found the pie badges but apparently i took it off the lanyard so i'm not exactly sure where the lanyards ended up but since i'm here let's do pie badge oh i don't have that many lipo batteries anymore i've got three tiny ones a 105 105 and 105 i have 305s and i've got a giant one i did actually i have a 2000 um i did actually take some of these and put them oh look i reset the microcontroller i have a static problem in here for sure and i have in my oh here we go here we go this is what i need a 350 i don't remember what i was using it for but i'll use that um i have in my digi-key cart a anti-static mat and like i got to take care of it because i think it does actually go through like the usb like because i constantly am resetting boards now so i need to get my static under control i've had the humidifier on all day and i'm still having static issues so if you have pointers for static anti-static stuff let me know i don't know the difference between i guess one of these is a pie badge light i have this pie badge and i have this pie badge this one's got tape on the back so that one must be the one that i've used before stuck on there pretty well this tape is not sticky anymore does the battery go there it is this is probably the battery that was on here before and there's a switch it's only showing a white screen i'm glad i tested it before i worried too much about it i've not been by it in a while and you and the team have done a lot of cool stuff pie leap is an example you're going to do great at pie cascades thanks thanks patrick the new salt batteries have left so you have on static seems impossible i don't know like this building is definitely i was thinking about maybe it's the flooring like the flooring might may not be dissipating at all but i i touch i've i i touch this um desk that i have here but i think it actually does go through like the usb that's sitting on it because like i reset my i reset the micro that's why to reset so i'm going to do something about it conductive ground post less on your feet can always do quite a lot to reduce issues mag tag no static issues no it was like rain it rained last night and i still have issues here um okay this display doesn't work anymore oh oh i saw celeste briefly wonder if this one works anymore i might have messed up my that's what being on a lanyard will do like you get to it briefly maybe it's just a bug all right where's my micro usb now badge boot what do you what version of circuit python do you think is on here doesn't control c oh i'm in the boot loader that's why all right before i boot load it let's see what version of circuit python's running on there i thought it was funny that had industries in it is circuit python not happy it's still in the boot loader i don't see the circuit pie drive coming up i don't know what's on here there's a circuit pie drive but i have this one plugged in tricky tricky maybe circuit python just got hosed like i thought i saw it doing something quickly high badge airlift that never happened three being finished will it come up i should just try this other one this other one the screen's falling off though now the screen's not like the reflector behind the light it's on hey that one started up okay anything on the screen still it's just white all right well that was a nice idea yeah it blips and then it goes away i don't know i am not nice to my macros that's part of it what this one does antistatic wrist strap clipped to one of the wires that plugs in their ground pin socket of a surge protector that's a good idea it crossed my mind to just wrist wrap myself but i don't think i'd be i don't know i'd rather do something where i just in this area i'm okay i need toddler fingers that starts up oh it's my python version of celeste did people know that i made this i ported the original like lua pico 8 celeste to circuit python maybe i'll just bring this i won't even update it can you see it oh there is a double jump isn't there all right i thought there was a double jump yeah this works pretty well i thought it was a double jump yeah that's one maybe i'll tape this down cool i'll just bring that all right oh lotta says 2000 milliamp hour yep was it this week a different showed an antistatic wrist strap new products now i suddenly want a pie edge huh dilute fabric softer in a sprayed on floor helps prevent static from shoes new carpet can be terrible in a video arcade this is what i know about this i think i generate it by scooching off my chair is usually when it's the problem yeah desko i was looking at the floor mat for desko thing yeah okay hey there's guesses wireless workflow on mag tag we didn't have circuit python 001 for much long i think i have a prototype feather m0 express that is red running circuit python less than one i it might be in that giant box of pcbs i don't remember exactly where it is second camera for overhead views oh i had this side camera too i just didn't switch it oh the i fix it anti-static wrist strap i will look at that i will probably make an order next week so yeah definitely with the humidifier all right well thank you everybody i'm gonna get out of here is four o'clock i'm gonna look for my yin lane you're a bit more and then i'm gonna get out of here i'll just bring this this celeste most pretty cool in my opinion so i'll just bring that i should charge it i think this battery is charged but i don't know does the pie badge have a charging circuit yes it does okay last minute last minute things to do before i go to like there's a pie cascade social to name i'm hoping to go to oops i wonder i wonder how well this uh celeste demo works now i should get a couple more 350s like this all right scatterbrain scott is done for the night and the weekend thank you all for being here it's a pleasure thank you for humoring me with all the this slides stuff i know it's not programming um but it's all part of what i do for ate a fruit and what they pay me to do so um thanks so much it's been a pleasure um if you want to find me you can find me on the discord server so you can go to the url adafru.it slash discord um that will get you um where we kind of work kind of like this sort of discussion but all week long um not generally there on non-work times so heads up with that um pie cascades this weekend you can attend virtually if you buy a virtual ticket if you like if you're going to be there in person please message me on discord or something like that so that we can coordinate i'm not going to be there a lot so i want to make sure and meet up with folks if they're there um what else if you want to support me you could go to ateafruit.com purchase some stuff like the pie badge here um and help me out and uh help ate a fruit out they help me out um they pay me to do all this stuff so thanks to them thanks to everybody who buys stuff from ate a fruit you make all of this open source hardware and software possible um i should be here next week but the week after i will not um so i will coordinate with foamy guy about doing a deep dive two weeks from today uh assuming i'm healthy which or healthy enough okay have a great weekend everybody we'll do a little window cam and then i'm going to get out of here and you can see my light you just won't have as many apis and circuit python before 1.0 and there was a period where all of the i o apis were like one module but we we decided not to do that before the 1.0 release all right have a great weekend everybody