Deep Dive w/Scott: RP2040 on Raspberry Pi Pico #adafruit #raspberrypipico #rp2040

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
oh if you're just watching this video after i streamed check out the description below for links to where all of the stuff is this is a big long video lots of topics so if you're watching this after the fact check down there to find what you are interested in uh it's going to be about when the cat gets up it's going to be about 10 minutes or seven minutes before we get going on everything um in fact i'm gonna let the cat out of the room she doesn't like it when i talk that's why i started with the cat cam anyway um so say hi in the chats for me as we get going and if you're watching this later uh check the description down below to skip right to where we're gonna start you wanna go out man are you gonna get back in bed cats all right just go i don't wanna i don't want you to bug me later hey brandon hi chris hi jennifer i disobey the pope yeah this is spook here he's loving the sun today um if anybody could type in the text or then the twitch chat that would be awesome too nice and the tweet went out good morning unexpected maker all right let me switch to this oh it's frozen trying to use the overhead today there we go let's do this is that what i want and look hello hi bruce hi grow guard hi em bill chris hi grow guard thanks for joining hi anecdata hi charles oh no the object object thing's still happening i was hoping it was fixed i'll try to try to keep that reloaded hi javier hi ingo good evening from germany thanks for joining i'm hoping we can have lots of folks join in i think it should be very exciting hi command aka knits sorry sorry that the discord chat is objectifying you folks hi microdev uh we'll get going in about four minutes um for those of you who haven't watched deep dives before they are about two hours or so long so um it's gonna be it's gonna be a deep dive i'll tell you that right now it's gonna be exciting i haven't found any videos on youtube of people going into the details of the rp 2040 yet um so i'm hoping this video can be that for people i'm one of those weird folks that is like totally okay watching like uh watching a yeah i'm totally okay watching a two-hour long video if it goes into super detailed stuff um hi porky oh i'm glad you're catching it live and chris uh sorry it's late uh it's kind of impossible to pick a time that works for everyone so i pick a time that works for me um hi jim hi gary i think i said hi to gary um grow guard says i haven't bought a pico yet but i definitely want to get one at some point i'm interested mostly in the pio stuff yes that's why you should pick it up um and i'll i'll go over all yeah i'll go over all of it i do want to just give some folks some time to some time to join in um but i'll take questions as well i'll take questions as well uh let me pull up i'll pull up the data sheet while i or i'll i can do that on the stream too uh retrograde puppy says will this replace my teensy for arcade button inputs i need a usb controller to program for my fight box that's not twenty dollars for a teensy yeah you should be able to do like button monitoring to usb yeah you should be able to do that it won't replace something like a tt4 because the teen c4 is just like super powerful but for something that's just monitoring um something that's just monitoring inputs and and acting like a a keyboard or a mouse like it's totally doable keith e keith the ee says hello hope the day's going well let me tell you before we get going uh i'm having a great week um i live in the u.s so we got a new president on wednesday um i've been working on this rp 2040 stuff for like a month now and so it's very exciting to be able to talk about it uh the launch was kind of the end uh yeah gara says the missing item from your year in summary yep and uh i've been trying to get this is the exciting thing that happened today i've been trying to get a uh andy ryzen 5950x to be able to like compile circuit python really quick and i managed to snag one this morning um so i'm just like it's been a great week and i got i slept well last night i didn't sleep well the the two nights before um because of the inauguration and the pico launch which was at 11 pm for me um but yeah well last night the rp2040 launch is going well i think so um [Music] so uh bretton says saw that ring guys post two salvaging chips from the rp-2040 via hot air even before launch day is quite some dedication um yeah let me the the rengai works for raspberry pi um so they probably didn't actually need to take a chip off hi phil hi parallel logic uh who did i say not say hi dave i don't think i said and gareth hi johnny um hoping we're going to have lots of folks in here and is anybody watching on twitch i don't see any i still don't i have that window open too it's just not on the video um foamy guy says for folks in other time zones i'm starting up ooh circuit python programming streams i'm looking at saturday mornings u.s central time which may line up at a nicer time for some folks i will likely stay more in python in library land than core and see than scott but similar content in other ways awesome thank you david for the the twitch stuff and keith thank you as well uh hi niradak um i think there are a couple [Music] uh i miss a question i think there's a there's going to be a lot of people asking questions if i just forget one um just let me know and i'd be happy to uh i'd be happy i'm happy to answer questions okay let's get going i'll i'll take a time code in the note stock here and uh yeah uh if you have questions you can also drop them in the note stock so i don't forget them um but but we'll go into all of it so let me start with housekeeping and take a time code so help hello oi let me let me switch cameras cause i'm gonna talk to it uh hello everybody my name is scott and i go by tan newt online uh i'm paid to work on circuit python by adafruit if you don't know what those two things are uh circuit python is a embedded version of python designed for microcontrollers and circuit python in particular is designed to be very easy to get going quick to program and very fast to iterate on we have a broad set of libraries that work across a lot of different microcontrollers under the hood means your code is super portable adafruit is an open source hardware and software company based out of new york city and they do a lot of great work so if you want to support me um you can do that by supporting adafruit by going to adafruit.com um that is uh they pay me to to do this stream and uh develop circuit python so um support adafruit adafruit.com uh thanks to that uh if you want to chat with me when we're not streaming or other folks get help with circuit python talk about the rp2040 the pico adafruit does have a discord server uh which everybody is welcome to join by going to adafru.it discord um the server is growing and growing and there's a lot all of the circuit python disk development discussion happens there as well so if you want to follow along check that out um this is a deep dive uh i've been doing it for i don't know how long maybe six months uh since the pandemic started i started it around the esp32 but uh we've got this exciting new rp2040 chip um what they are is uh i do them this time normally which is uh 2 p.m pacific uh on fridays i'm in seattle so pacific time is kind of what my brain thinks of it typically goes for two hours or more um i have a feeling we're gonna have a lot to talk about today um so maybe we'll go a little over we'll see questions are welcome so if you have questions just drop them in the chats and i'll try to see them if if it does scroll off especially today i'm expecting lots of folks and lots of questions uh just go ahead and uh post it again in case i miss it next week is uh friday normal as well um the last piece of housekeeping is that um you can see the cat in the cat cam there uh his name is spook he's an epileptic uh he does have seizures from time to time although his new meds have been working really well um so that probably won't happen but if i'm like on the stream without like talking at all it's because i'm making sure that he's okay uh and i'll meet and do that and then and do that so um that's it for housekeeping um let's continue looks like my timer is just a few seconds too quick but that's okay um so this deep drive we're going to talk all about the rp 2040 and the raspberry pi pico uh let me switch to the overhead so this is a a picot that i was sent by the raspberry pi folks um so uh thank you to the raspberry pi folks for sending me this pico uh they sent it to me about a month ago um i was in the i was lucky enough to hear first rumor of it from ladyada and then uh from ladyada and then she asked the raspberry pi folks to include me so that we could get a jump on it um so yeah i i've had lots of times to read over the data sheet i've done some development uh insert bringing circuit python to it so i'm hoping that we can get in the weeds and talk about um the details of the chip uh what i should say is that there's actually two really interesting things in the overhead here um the chip itself is dubbed to the rp for raspberry pi 2040 and then the board itself is called the raspberry pi pico and i think that's something that's that we need to be clear about is that this is actually two things and it's very exciting for the like fact that raspberry pi is designing their own silicon and getting it manufactured and then um it's also interesting that the this board is interesting the raspberry pi pico because it's really inexpensive um they're giving it away with all of the hackspace magazines this month and they're also and it's like four dollars u.s so and there's a lot they made a lot of the initial run so um if you haven't bought one yet and you want to i i i kind of bet it's still gonna sell out um but there is a lot of stock initially so you should be able to get uh get one now if you want to um so yeah this is the raspberry pi pico it has a rp 2040 on it we'll go into details technical details in just a bit i'll pull up the i'll pull up the data sheet um i do want to since i have the overhead up here before i go to the desktop um hi juan thanks for making it uh and mark sorry there's no closed captions i think i'm on the right um settings for youtube that it should have been there um but yeah so uh what we have here is uh timon says so far it's all pre-orders though what the shops listed yesterday so the what they released right now is just the pico board the chip itself is not available more broadly so what i have here is a prototype uh adafruit feather rp 2040. so this is a feather form factor board but the microcontroller on here is the rp2040 as well and this design is basically all set to go this design here is a is not the revision that we will launch with um there's one pin change that we did and we could talk about that um but we'll basically have these once we get the chips from raspberry pi um and they've they said in their announcement that that the chips themselves will be available in the second quarter um so i'm not sure when adafruit will get them but we're basically i think ready to make them when we get them um so yeah this is coming uh and uh i've actually done more development on the feather than i have on the pico um and we can talk about that so let me just check the chat pico was pre-ordered every shop but shipping date was like 28 so soon ah yeah um i know adafruit we put them in stock and they they've shipped out like uh all of these here this is actually an adafruit order i got this morning um nerodox says at least you get a reset button on the feather yes that's true um and i know we have a lot but i don't think they were putting them all in the are there more than one pico live stream i if you have uh let me know if other folks are streaming the pico i'm curious um okay let me switch to the desktop here do we want to talk specs or do i one thing i definitely want to do in the stream is um oh hackster is streaming now thank you um i didn't realize they were i'll have to check that out uh i'll check the the recording out after this okay so um do we want to talk specs or should i actually show how to use it actually let me just do that right now since i have the overhead up here so what i thought i would do is um basically show in the next minute how to get circuit python on it um so uh a couple things this is all everything i got in my order so i got a number of picos um and i also got my osh park order i thought i just mentioned this um this is the thing that i was going to use to get the power like through a usb connection uh to the nordic ppk2 gareth says don't read the specs turn it on okay yeah we'll do that um i also got another raspberry pi module because i do want to get circuit python on that um somebody made a comment yesterday it's like this isn't what you meant by getting circuit python running on a raspberry pi is it and i was like no but i'll do it um i picked up the new like capacitive touch breakout thing um i got one of the nunchuck adapters uh because i have i think i have nunchucks around here somewhere which is cool um oh looks yeah looks like uh 18 makers picked some up at micro center so that's cool and um okay so i've got i got three this is the limit i think for the cust this is the customer limit um and this is uh i think it's important to note i believe like some folks have been talking about the way that the pi zero was limited um and i don't think these are the same um you should be able to see that once these become regularly available you should buy be able to buy a lot at the four dollar price point um so let's take one of these out and show how it works um so i'm just gonna cut it open it doesn't come with headers you can buy from adafruit uh version for five dollars that has loose headers that you would have to solder on um the one that i have that has headers is actually that the pi folks sent it to me with um gregory says could circuit python be implemented on the raspberry pi three and four through emulation uh you don't actually need to use emulation you could do the drivers or you can use a lot of the drivers for circuit python just in c python via the blinker library um but i would actually like to get circuit python running bare metal on the raspberry pi as well meaning no linux underneath it um who's soldering the headers human or machine i mean the headers i got were probably human human soldered um okay so this is oh and it froze again all right let's switch to the desktop you can see in the froze frozen image um the most important thing to see in the image before we switch is that there is one button on this board um it's the white button there and it's called boot select so what i'm going to do is um i'll just tell you and switch to and of course i didn't take a time code let me take a time code desktop make this smaller so you can't see it um and i'm gonna pull up here so i'm not actually sure i haven't done this with a fresh one so we'll see what happens i have a all right actually i know i know what should happen here so here's my file explorer and what i'm doing is you can't see it anyway i'm holding the boot select button and i'm plugging it into usb micro cable and then you can let go of the button once it's plugged in and just like circuit python does it shows up as an rpi rp2 and if you click onto here it mounts and there's info about uf2 one thing that's really cool about this is that this uf2 bootloader unlike all of the other ones we have at adafruit this one's in rom which means you cannot erase it it will always be there and it will always work which is really really cool it's the first board to have uf2 built in which is really epic so next step what you're going to want to do if you want circuit python is you could go to this page it's circuitpython.org board slash raspberry pi pico and we just released 620 beta0 earlier today and this is the first pre-release um it's not even a factory flash tune it's in the rom it's in the rom so yeah like uh yeah it's not just written there so i'm gonna click uh download uf2 and it downloaded here and um if i just open it up here's my downloads folder that has lots of stuff but this is the file i just downloaded and so i'm going to drag this uh 6.2 uf2 to the disk drive and copy it and it's copying over and once it's done rum is not oh i oh ren hinted at that bit interesting if it's factory flashed um i don't know how it's implemented ren would know um okay so circuit pi drive showed up um and let's see what it does so now we have circuit pi and if you've used circuit python you're you're golden this works the same way as before so if i let me double click code.pi and code.pi here is just a print hello world this is our standard code.pi that we do when we re when we create the file system and if i want to connect to it i'm on linux this works on mac as well you can do screen and then i actually i have a second circuit python board connected which might be the timer um let me just be a little bit careful because i don't want to mess the time up um sdc where does it tell me acm2 okay i was about to control see it but that would that would lose the timer time code um les says i was using circuit python on the pico yesterday at work it works great awesome thank you yeah i i've been working hard on it um okay so if you connect to it and you don't see anything what you can do is you hit control c and that will uh get you this prompt so we can see here that we're running the 620 beta0 and that is for the raspberry pi pico with the rp2040 um so now this is called what's called the repel which is the read eval print loop where you can do things like just type in one plus two and you get three you can say print hello and it just does it immediately which is really cool i i also like it for um seeing like what apis are so you can do import board and then dur board which will list all of the things that are like attributes on the object so here you can see all the different pin names uh really helpful uh but the problem with the repl that i don't really recommend folks is that it is um ephemeral meaning the code that you type in here doesn't get saved anywhere so it's great for figuring out like what like what pin name do i need uh but it's not great to like iterate and develop on code so um what you do is you hit control d and then here you can see that it actually ran our code.pi with hello world so now if i um scooch this over to the side and make this window smaller i'll show you how to edit so in circuit python on the rp2040 generally uh we make it really easy to iterate so if i want to do i could just say hello pico and hit control s to save and now it re-ran the code for me and did hello pico i can do that again and say 4i in range 10 we can do 10 hello picos and just hit save again and now we get 10 helipicos so that is the very basics of circuit python uh i don't want to cover kind of like all of the basics because frankly we have really good documentation and this is a deep dive um so at this point i think we should go to the data sheet and um then we can talk about questions as well um chris asks any idea on tiny ghost support i don't um i work on circuit python um i i haven't seen any mention of that i did hear rumor of rust support and i i would expect that that happens as well um yeah toddbot says let me take this moment to vote for being able to disable specific usb devices in circuit python uh yeah that is that is uh on our list uh you can check out the circuit python issues for all of that um okay so uh let's let's do a data sheet overview so um there's some really good resources if you want to know more about the raspberry pi or the rp2040 and the pico um paul says hey late to the party did someone release a new board or something yes sony not only released a new board but raspberry pi designed their own chip and released that as well um david says can you choose the core used to run circuit python you cannot um it just runs on the first one um it runs on core zero i believe um there's some code that like the we we're built on the pico sdk and so the pico sdk kind of manages the startup stuff so there's a blog post from yesterday um that is a good resource from the raspberry pi folks and there is a hackspace magazine which you can get the digital copy um i was reading this earlier it kind of it covers a lot of the same things but it does um also give a little bit of background on like how long they've been working on it i thought it was interesting that it's like a 40 nanometer process because i'm kind of a nerd like that um that is kind of a gauge for like how uh big transistors are so like the i i said i just bought a new ryzen and new ryzens are on a seven nanometer process so that can kind of like give you an idea um two folks are asking about the the cores so uh for those of you who who haven't been following along um the best resource i thought i had this open here but i don't oh it's just not um so the best resource is this pico getting started and um i think that's right am i in the wrong spot pico more info products view documentation getting started for specs i want the data sheet okay it's downloading i wanted to download it again because i might have had a pre a pre-copy um so here's the raspberry pi 240 data sheet thank you todd for the link as well um this is the first thing and i've seen a lot of people saying like why this chip is so awesome is these docs are awesome um so uh that was like when we were debating like whether we should put effort into this chip i took a look at the docs and i was like yeah yeah we should take a look at that um juan says 40 nanometers sounds large but how does that compare to other mcus i don't actually know um i haven't heard what the others are i think it's pretty comparable i suspect it's comparable because um the really small nanometer stuff is just like really expensive still like the seven nanometers like a really expensive process um yeah yeah so like there's a data sheet there's a data sheet for the pico the board there's a data sheet for like hardware stuff um ah nice and lady ada is in the chat as well see if you have questions for her as well corki points out that nanometer designations are a bit foundry dependent unless uh they use tsmc they do not use tmz tsmc that's one thing they cover in the magazine they're they do sony tanazawa or something um one thing i liked about the data sheet and maybe we should cover let's cover let's cover the high level stuff first which is usually in the introduction um let me i like these tabs but it takes so much space up so uh we'll we'll close those um so here's the key features let's just briefly go over these so that we're on the same page um tom's hardware reported they were using tsmc uh check the hackspace magazine i think it's in there unexpected maker says esp32 is tsmc's 40 nanometer um maybe i'm wrong okay so dual arm cortex m0s up to 133 megahertz um i believe that the core uh i know the core clock weight rate is 125 megahertz and that's currently what uh circuit python is clocked at um there is 264 kilobytes of on-chip sram in six independent banks and the way that that's broken down is its four banks of 64k which gives you 256k and then there's two other banks that are kind of like scratch rams that are 4k a piece for a total of 264. i think there's also um there's dedicated ram for usb and there's also dedicated cache ram for the flash and that gets to this point which is there's actually no onboard flash um okay so so now that we've confirmed there's two cores mark says sorry that this was covered before i showed up but can circuit python use boris both cores or not yet um the answer is not yet um micropython has it so that you can do um you can use the thread api in micropython to use the second core um but i'm kind of like not exactly sure the way that we should expose it in circuit python um so hold that thought we could talk about it and and threading is like one way we could do it um but i've been thinking more the crazy idea i have is that circuit python's role python's role in my mind is that um yes and timon is getting to this too it says can you program the course separately for example run c code that can talk to circuit python on the second core and microdev says we want all the cores um so the question is what do you want the second core for and i'm thinking more like timon says and luke who worked on this also says you could run some dvi on the second gore yes so i think that um i think it's more interesting actually to not run python on the second core i think python's role in microcontrollers in general is is to orchestrate and iterate make it's orchestrating separate things that are doing stuff um easily right like the whole point of circuit python is like you can iterate really quickly but then it handles all of the timing sensitive stuff for you um and there's a lot of ways we can do that on this chip which is why it's really interesting um and so uh let's keep going down let's keep going down todd says i'm gonna run basic on the second core you can although there's basic python that i that i sketched out um mark says run two copies of circuit python at once for reasons i think you'd want threading like there's like you you need something that shares uh across the two can you invoke inline assembly from circuit python um no but um we can talk we can talk about so many questions um yeah so juan says can you sleep the second quarter to save power yeah the the startup code should put the second core and just a wait for event loop um so it's just waiting uh but yeah one core is like concurrency's really hard um you all are on the same page as me so let's let's keep going down here so that we can uh talk about why i'm not why i'm thinking that circuit python shouldn't run on the second core okay so there's dma controller which is great fully connected ahb crossbar means that like all the things that may need to read data or read memory can do that on their own luke confirms that it's the second core is left in wait for event plus deep sleep uh so yeah it should be basically as off as it can get um okay there's interpolator and integer divider peripherals this just like accelerates the number crunching on the core i think i haven't played around with that um there's on to programmable ldo to generate the core voltage so you give it 3.3 volts but the core i think is 1.1 and it's done all internal with the chip and the sdk sets it up for you so you don't have to worry about it um two on-chip plls that take the the external oscillator and create the usb speed and the core clock there's 30 gpio pins uh four of which are can be used as analog inputs and the cool thing about this also is that um uh these do not that that 30 number um doesn't include the q spy pins the swd pins or the usb pins uh which is really really cool um so you actually get 30 to play around with um skazi asks can i use any quad should i i should be taking time codes here i'm sorry i gotta slow down a little bit oh somebody's doing it for me thank you i suspect that's david so the question is is can i use any quads by memory with rp2040 like an mram memory does does uf2 support these memories or only flash memory um i i i don't know and so the what you have a chance to is that um the initialization code um yeah the initialization code for it is um loaded off the memory itself so there's some like basic commands that you do have to respond to and for it to to load that 256 um words bytes of uh code that is used to initialize the thing um it's run by the ssi peripheral here that the docs are really good just look at the docs and it'll tell you like your chip must support these commands um yeah and command says that as well so check out the docs for that i don't see a reason why not but i don't i've never used an mram chip so i'm not sure whether the command set overlaps or not okay let's keep going um two uarts two spy controllers two i scored c controllers 16 pwm channels um where it's eight it's eight slices with two channels a piece and in circuit python land that means that um in circuit by downland that means that uh each channel's shares are kind of a base frequency so you can have like two things going the same frequency with different duty cycles um yes some people are in twitter are really like being a bit harsh on this and i don't think that's i don't think that's warranted at all and i'll tell you uh why after i read these like last two points um it has built-in usb with host and device support built-in phi and also it has eight pio state machines so pio is kind of like the thing that they're most excited about um charles says the pico has two megabytes of flash uh can it handle larger flash chips yes it can handle up to 16 megabytes um yeah so the pios are pio is short for programmable io and uh it's really they're really interesting because um doing we we talked about this last week on the deep dive which is um what is real time because i was saying like circuit python is not real time and real time is like also relative to like how real time you need things to be um and the uh the pio state machines are almost cpu processors that are like a custom instruction set that make it easy to do real-time communication kind of to the outside world and then that um and so they're programmable um and so they're just like super interesting because they're basically you know this is a dual cortex m0 but there's also eight of these state machine cores that are like almost but not quite like a full cpu on its own um but they're designed to be very good for real-time stuff um which is really cool um mr who 30 says circuit python has a list of supported flash chips on the source code which is easy to find yes i'm not sure all of those will work um but they are uh there's one other requirement that we want i want to have for um this is so good so many cloaks it's awesome um let's get into pio in just a second let me just address the flash chip thing um one of the the constraints that i did find for flash chips is um sorry who is i think david who's helping me out with time codes one of the constraints circuit python is going to have for the flash chip is that we have no unique id which is what we use for serial number and usb so the flash chips most flash ships have have a unique id on them and so our plan is to just use that so that'll be an additional constraint that we'll have for circuit python so we'd really like to be able to get a unique id uh from the flash um okay so let's talk pio um and let's just let's just go into the data sheet so again like the raspberry pi folks made amazing docs so if i don't cover everything here check out the docs they've done a really nice job i recommend if your pdf viewer does not have a table of contents find one that does it makes it um really good oh juan carlos points out circuit python has a hundred well a thousand nine hundred and ninety nine people have started circuit python um so if you have not starred circuit python on github please do it's uh github.com adafruit circuit python we'll break 2000 today uh which would be really cool uh so yeah as bruce says start starring um okay let's just jump to the pio because that's the most interesting um it is accessible so so there's already micro python support for the rp2040 as well it's official raspberry pi paid for it um so you can use it there and we have the beginnings of support in circuit python but we haven't just copied um we haven't just copied it uh and we can go into into the why my api for pio is different as well um but let's just talk about pio because i think that's what folks i mean it's it's probably the most interesting part of this chip let's be real um so let's take a look at this diagram um okay so there are two p so pio is short for programmable i o there are two in the rp2040 um and each of those in the rp2040 has four state machines um yeah the g is silent um they have four state machines which are things that run instructions but the instructions are not compre as comprehensive as you would see even on a cortex m0 but they run those instructions independently of everything else which makes them really interesting for um for stuff so um if we look here so uh there's only two the state machines are almost independent there's two things that they share they share um irq lines so irq is short for interrupt request this is a way that you can cause the ma the main cpu either one of them to basically stop what it's doing and do something else so that's what an interrupt is and the state machines themselves can read the state of the interops tube so interrupt state is the only way to communicate between it's not i guess you you don't necessarily that's not the only way you could communicate but it's like the primary way i think you would communicate between state machines david asks are the state machines running at core speed so yes they can run up to the core speed uh but each indepen each state machine has an independent divisor as well um james is comparing this to the pio the pru which is the name i think in the beaglebone i've not used that so i can't like do an apples to apples comparison um bart says what is an example so any sort of protocol that is timing sensitive is what the pio is really useful for the classic maker example is neopixel where neopixel is an 800 kilohertz signal if you are transmitting a 0 you do a third yeah distributor says neopixels if you're transmitting a zero you do a third of that 800 pixel cycle and if you're transmitting a one you do two thirds um and we can get into the weeds about this um that's an example uh circuit python if you download 62 beta0 already uses pio to do it in comparison for the same d21 what we have to do is we have to turn we bit bang it which means that you use a cpu core to transmit the data instead and we actually have to turn off interrupts so that we know exactly what the timing will be from the core and that gets really hard um you can post micropython stuff just know that the apis will be different for pio between micropython and circuit python one of the reasons that it's different is because micropython allows you to pick which pio it's on whereas circuit python will not allow you to do that and the reason that it's not going to allow you to do that is because we use the pio internally as well so we actually need circuit python to manage like okay you want this statement you need a state machine here's one and your program's the size here's one that sort of thing um okay so uh four state machines the other resource that they share is this instruction memory uh which is 32 instructions it's not a whole lot but the uh the neopixel example is only four instructions so there is a lot of room to play each in each instruction which i'll scroll down and we'll talk about in a bit is pretty powerful so um it's pretty like dense um timon says oh and why does circuit python need to use the pio well one neopixel and two uh things like we already have an i2s api we already have like uh um yeah we have i2s uh like we have some apis that we will implement with pio so we need that flexibility and luke who's in the chat uh who worked on this chip says 32 instructions unless you use out exec so there's two ways you can run instructions that are not stored in this memory one is if your instruction is out exact it will get it from the fifo which i should talk about um or you can write from like the from the cortex m0 you can say like just run this instruction by writing to a register and it will run that as well acoustic tuna says it'll help with timing sensitive sensors like the b and o zero five five i think the b o zero bn0555 is still um it's still i squared c i think it's just like a little weird with that um will you implement can bus with pio i imagine it's possible but i have not seen an example of it you'll still need a transceiver i assume uh but yeah i assume it's possible so let me let me go over some more of this okay so we talked about interrupts being a shared resource and we talked about instruction memory being a shared resource so what is not shared so each of these individual state machines has a fifo which is short for first in first out um and it's each one is four uh 32-bit words long um and there's there's one going in and there's one going out um and the benefit of a fifo is that it can um it makes communicating with the state machine less timing sensitive so if we're talking neopixels right and we're transferring say just a byte at a time we can write three bytes and then the state machine will chew through those bits as it needs it um it gives us some like uh in the docs they call it slop so it's timing slop so like the cortex m0 can like queue up some stuff although we don't use the cortex m0 because you can use dma um it just like it gives you some wiggle room in terms of like getting things synchronized together um so fifos are really handy for that so there's a fifo for each state machine which again is independent and then the state machines themselves can talk to the gpio they can talk to any of the gpio we can talk about how that is um it can also talk to whether the output is enabled or not and then input wise i think it always gets the input yeah so that's the super high level um here's a here's some examples so it can do like 80 80 and 6800 parallel bus so that's like display io parallel bus is what they're talking about i squared c although we won't circuit python won't use it for i squared c currently we use the regular i squared c ones um three pin i2s which we're going to implement we just haven't yet sdio we haven't implemented but that's like the faster way to talk to sd cards um spy d spy dual spy and quad spy we don't have the implemented but you could do it um the spy in circuit python is just using the other spy peripheral generally like those are less interesting to me because i'd rather like save the pios for the things that only this the pios can do um so someone says i was wondering about that as the docs mentioned these pio1 and pio2 peripherals which sounded like only two pins would be usable via the piao so um what timon is talking about is the pin this gpio functions so um there's a mux that like the outside world basically you is called a pad and that's the thing that like drives enough current and circuitry to actually send the signals out of the chip and then internally it's like a lot lower um like power signals so like the pad is the thing at the very outside and then there's a gpio box i talked about this a little bit last week um and it decides who kind of gets control of that pad um and so the reason that there's a pio0 and a pio1 is that only one of the pio peripherals again like each one has four state machines but you can't have a pin being written by two at the same time because of this so if you had a protocol that like multiple state machines need to reference the same pin then what you would have to do is um you would have to make sure they're on the same pio and there is a process for if you have two state machines that are asserting different values there's a way that like it negotiates which one wins um yeah narradoc says what i understand is that the pins have to be grouped in a certain way which is replicated on the feather for that reason i'll get to that i'll get to that and that that was something that i requested from from lamore um again i'm not gonna be able to read the whole docs so let's keep going on pio because i think obviously people are excited about that um there's a question for luke in the chat about the usb lines on the pi pico and yeah like bretton says i would guess that it doesn't matter because usb 1.1 is not that fast um okay so there are other resources i think there's a diagram here yeah so here's an example of a state machine a diagram of the state machine so we talked about the fifo so there's a tx 5 phone rx fifo and there's also so there's two registers if you've played shenzhen i o it's kind of like that um shenzhen i o is like a game where you have to like do very limited programming uh based on like just a few registers so registers you can think of as like memory um that are kind of like isolated and only accessible from the code on the state machine um so uh let's see there's an out out shift register which you'll see abbreviated as osr um there is an in-shift register which you'll see is isr um and then there's a scratch x scratch y each state machine has its own clock divisor which means uh they can run a different thing at different speeds uh taobao asks are there some examples doing usb host on the pico i believe there is um there is an example in the c sdk um our usb micro connectors heaps more cheap cheaper than the usbc wondering why they went with older micro uh you'd have to ask them the feather does have a usbc on it so if you want usbc there will be options for sure okay so there's pc which is the program counter which you can read and that's uh going to range between 0 and 31 because there's a 32 instruction memory um and then there's control logic um and that that control logic can talk to and from gpio and and irq interrupt stuff um tab bot says usb c connectors are still twice as expensive as micro usb okay so let's talk about the ins instructions let's not talk about the example does that make sense we could even um we can even do some demos here we've got time so here's another interesting diagram for the output shift register [Music] um i guess let's just talk about i want to just talk about the okay so let's let's start here can everybody come to the discord chat rather than the youtube chat um okay so there are let's go here there are nine instructions i think it's nine one two three four five six seven eight nine okay so there's jump weight in out push pull move irq for interrupt and uh set no you everyone come to youtube chat um david asks is it a fully turing machine um in the docs it says it's likely turing complete uh so it hasn't been proven um okay so uh what you'll see here is so instructions are 16 bits long um and the first three bits kind of classify the instruction now if you have three bits it's weird that you have nine instructions because three bits only include like in codes eight but if you look closely push and pull have the same top three bits um and bit seven here is different um so let's just uh let's see where do i where do i start so if you're doing flow control which is like mike says is there a new feather board with the rp2040 there is but it's not for it's coming soon uh we don't have the chips to make it yet but we'll sell it it's designed i have it on my desk um but yeah so flow control you have some options um should i start with flow control or try to talk about how you get data out okay so to get data in there's an instruction and actually let's just scroll down i'm confused it does so much so all instructions all instructions can do some things um and that's what this common five bits here is it's delay and side set so um delay allows you to add additional clock delay after an instruction runs um so one of the cool things and that makes this really good for real time is that each instruction takes one clock cycle however that might be too fast for you so you can have up to five bits of delay um so basically what the way you can think about it is that it will run the instruction and then count down the delay so if you have an instruction with a delay of two the instruction takes one cycle and the delay takes two more cycles so if you're looking in your line of assembly pio assembly you'll see one line but it actually takes three cycles to do that one line so delay is really handy for timing and we can we got another hour so we can do some examples to show that but the important thing to note is there's also this note of side set so side set is one of the three ways you can output data to a pin or somewhere else uh no output data to a pin so there's out set and side set so side set is special because it can set a value concurrently with doing another sort of output so that's what you can see here is that also in and out can do side sets as well so it saves you from the cases where you need to like set your clock high at the same time that you set your data high for example um so that's what side set does and you can have up to five wires that are set by side set but note it's delay slash side set which means for every bit of side set that you do which i think is actually the top bit down you lose resolution on how you can delay [Music] so note that there's a trade-off there and what you do is you tell you'll tell the state machine like how many bits of side set it has and it'll figure out how much of that is delay as well so delay and side set are common to instructions and then each each other instruction has options um and we can go through those if people think that would be helpful um yeah maybe we'll just do a quick overview of that because we could actually get to some examples here um i don't have everything set up uh but we can we can do it on the fly um pick an example yeah okay let's let's do an example let's show how i want to do this in circuit python um yeah dcd says curious about cp examples as well so let me just cover these so um let me just cover these generally so that you know so that we know that what we're looking at so jmp is short for jump what this does is it allows you to base on some condition or always go to another address weight is another way to just delay uh but you can also like um wait for like external state so like you wait for a pin that you're reading in to go lower for example so in what it will do is it will read data from the pins or from the source and push any number of bits that's what bitcount is into the input state register input shift register out is the reverse so it takes bits from the out register and puts them somewhere [Music] there's also so then what you have is push and pull and so this is how you get data from the fifos the tx fifo into the output state register or the rx from the input state register to the output to the input state register shift register it is complicated but it's it makes it really powerful um yeah folks want to see an example here so um i will do that and let me just talk about these last three so move allows you to move stuff from like the scratch register to input or output shift registers uh interrupts allow you to set and read um and wait for them um and then set is another way of setting values to another set of pins um okay yeah and luke points out like there's really good docs about this um and so if you look in the the stk example there's examples there but i actually i think i want to live code this um and i have the silly i have a client on my desk that i'll climb under and and i think it works i think it works on this computer um okay so let's let's do an example and i'm going to use the the feather because frankly the feather is a little bit more a little bit easier to work with sorry sorry to everybody who has a picot but hey actually i'll use the pico the pico's got an led we can use that we can use that until we need to scope it which i'm going to want to do i'm going to want to sally ate it okay i'm going to use the feather and i'm going to have to redo the overhead here so overhead frozen unplug replug oh where is it there it is i don't know why it stops overhead hover cam okay okay so um what i have here is the rp-2040 um and i'm just going to plug it in and you can see that the the light is acting like the light would normally does for circuit python which is good because that's using neopixel um and i just look oh look i've got two circuit pies one is the pico okay let me safely remove that one oh and it's saying it's open which is close this is the one i want oh look i even have my test code on here um okay so let's open it up um [Music] what am i doing okay so this is just a neopixel test um and you can't see it i realize that now desktop with overhead there we go so what i should be able to do here is just edit and it's yellow for 10 seconds and then it should go back and then i think what i also have oh no i don't have that set up one thing i was doing is i was reading the potentiometer here that i have and making the brightness change uh but this none of this is pio stuff so let's let's rename it and it's a little test and then i'm going to rename this because the library is renamed so the way that we're i want it to work in circuit python is what you do is you write pio asm and then you call assemble and that produces uh oh hey folks um they enabled morse picos in stock so they put a few 100 in at a time so if you didn't buy one from adafruit and want to buy one from adafruit now's the time um okay so let's open this code up hi oh and it refreshed and then i didn't realize it don't need that in fact let's just close all of this stuff okay so here's my test code um the library is available um so my my idea is that what you'll do is you'll just write it in a string or actually it should add the ability to load it from a file but i think that people are going to share things as pio asm and so i wanted to support that so what you do is um i this is just test timing stuff so you take a program and you call assemble on it and that will produce the like encoded version bytes version and then what you do is you say i need a state machine and this is different too we'll we'll have to fix this code um it might be using slightly older versions but you give it the program you give it the frequency you give it an initialization program and then you can tell it what pins you're using so that's the way circuit python has it going um and then once the object is constructed it's running and then if you want to do something like neopixel you just say state machine dot write and that will write the data out to the state machine this is where the the like support is incomplete and i've been thinking a lot about how to do it right now we only have a way to write to the tx fifo we don't have i haven't added a read yet i was kind of mimicking um the way that uh spy is working um but i don't know i haven't decided it yet um there's some interesting things that we could do on how how do you get data to and from from python um or from somewhere else uh out to a out to a state machine okay so um the other thing i want to set up is i want to show i want to show the celia logic level analyzer stuff so let me get that going um i just switched computers i don't those of you who follow me know that i've been like oh yeah i'm using my mac um well the reason i was using my mac was so i didn't accidentally leak the raspberry the rp2040 on this stream i didn't want it like in my browser history i didn't want it anywhere um so uh sorry if i'm i'm getting set up here a little bit but um it's all for the best i think so i'm gonna take my headphones and i've got to plug this in under which you can't see plug it in under my desk okay yeah bruce says when i worked on nda stuff i had random names for it all yeah and pico like if we just called everything pico would be vague enough i think but i just i did not want to be the person to leak it and i wasn't so let's open logic here hopefully it works add this thing can we please get bear chips in the store and 88 ladyaid is like we only have like 10. so all right new version um and this is not all the settings for before i'm just gonna do one um and i think what i'll do is i'll do it on d13 which you can see so d13 is interesting on the feather because it is the pin that's also the red led so this needs to go to ground which is this pin as well it's annoying i think that's i'll take this out we don't need that potentiometer okay so i think what i want to do is i want to start with a square wave because it's just i think a really good place to start so i'm going to use d13 gonna blink it and then turn it off and then i'm gonna do a square wave and then i'm gonna run it at 800 kilohertz and i don't actually need side set and auto pull i'm going to simplify it here right so gareth says so you can reprogram the pio dynamically if you wanted to once it's running you can't recode re-program the instructions you'd have to turn it off to do that maybe not maybe you can write it you can't read it freeze the overhead cam if there's another unannounced product coming soon you're gonna be uh if it freezes you're gonna be sad because i don't i don't know of anything this was the big one okay luke says you can hot patch the instruction memory the hub 75 example does this it's a bit of a hack um all right so we're doing square wave i've got this like prototype thing just to make sure that everything's set up so let's invalid digital trigger settings capture duration let's just do a second so we're getting nothing until i save and still nothing let's get the console open too and this is on the wrong board i still have the other picot plugged into so let's okay so i renamed it this co this code's a little old um gareth says can you destroy and recreate a pio scheme yes yeah so it in circuit python we track what you're using so all of our circuit python objects you can say d init and it will release all the resources and allow you to reuse them later we also dna everything when your code finishes to make sure that the next run of your code starts fresh graham says init nice idea thank you um gram works it raspify as well okay so we renamed this uh rp2 pio so i'm just gonna have to rp2pio and hit save and the trigger didn't trigger no module name p-i-o-a-s-m and that's because i renamed that one um adafruit underscore i wanted to leave the name in case somebody else named something that way i'm hoping we see a trigger here we should have did i oh it's blinking did i plug in i think i plugged in the right spot why isn't celie oh you know what i'm not plugged into channel 12. that's the worst plugged into channel four stop stop stop always check your channels it's the it's the same color okay so if we hit start okay we can see we're blinking yeah that's what that's what uh deep dives are all about is like figuring out what the common mistakes are um okay so what we have here is we can see that we have a 50 duty cycle we have a high and we have a low and if we look at the frequency it's 1.2 megahertz um and you could think like oh that's like definitely not the eight megahertz that we set in here or the eight kilohertz uh but what we we're actually doing is 800 kilohertz by six um and if we look at this real frequency you know i wonder if i fix this let's let's load a new version i had a bug around frequency at one point um so let's make sure let's make sure we're using let's let's if you want to see what version you version you're using you can control c and enter the repl and you can see i built this on january 14th um so this code's all a little old so let me just control a k and then i will eject safely remove it still thinks that one's open i don't know why it thinks there's something open on it but i'm just gonna yank it hopefully that's okay and now on the feather um i can what i could do is i can so boot select is on the end here um the end here that's where boot select is next to a stemi qt port so what you can do is you can hold that down and then hit the reset button and that will get you into the bootloader so we can see the rpi rp2 just pulled up and let's actually just go to uh downloads page but we want the feather version so let's just do rp2040 and we'll just use this version hopefully it works um downloads adafruit feather too many downloads rp 2040 beta 2. there we go copy that over does this cable have data yes i think so but that is something i've totally forgotten as well i have usb cables that allow you to turn the data lines off where in memory does the pio code go the pio code goes into a dedicated instruction memory on the pio peripheral itself and there's 32 slots for 16 of 16 bit instructions and that memory is shared between four state machines and an individual pio and you cannot read it i don't think yeah and it folks ladyada is in the discord chat so if you want to join that you can go to adafru.i2 discord um to chat there hmm i copied it over but i got the drive back which is not good did i not copy it copy here i probably forgot luke says you can read by writing pc and then reading the sm instruction register right right so you can you can read the currently executing instruction so yeah it's 64 bytes you can always remember what you write to it totally um oh and it it erased everything um because i changed how much space we saved for circuit python right at the last minute so that's why i have a new folder here luckily if i just pull up my editor we'll see that i can just save this again uh oh it's circuit by one now just save as replace and i'll also need um the assembler library which i just pushed to github but i think i have in home repos drivers pio asm copy that over too all right um let's see are we on acm 2 now looks like it yep and we're all updated so let's simplify this frequency and just say like we just want to do 800 kilohertz hopefully my map hopefully my code works and let's capture it again okay so if we look here we can see our frequency is 200 kilohertz um with the width of 400 kilohertz so let's take a look at our code let's get into the assembly so what the square wave here has is we set penders and then we have this program that sets uh the pins to high so pins is a generic broad thing and the way that we told it what pin pins means uh is that when you're using the set instruction the first set pin is board.d13 um and what you could do is you can you can actually address so with the way that you define pins is you say what start pin you want and how many pins uh in it and not in addition but total you want um so count uh and count defaults to one so that's why i haven't provided it here if we want to see there's a lot of options if you want to see all of the options the read the docs should be up to date now so if you go to circuitpythond.readthedocs.io en latest make sure it's latest and exactly gara says that's why you want it wanted eight in a row exactly so by having that side of the feather or it's not all on one side of the feather there's seven on one side and then the eighth pin is on the other side but they're all next to each other what you can do is then you can use all eight all at once from a state machine because it requires them to be consecutive um okay so if we go to the design and not the design guide core modules and i think there should be an rp2 pio and there's this big long list of uh parameters that you can give it so you you could see a pattern here so program you have to provide frequency you must provide you have the option of giving it an init which is another program but the way that it works is there's a you can override the instruction by just writing to a register and so the way that init works is that it starts your program and then writes kind of concurrently with that um which is a little weird and kind of a gotcha so be aware of that and then you can see a pattern here first out pin out pin count first in pin in pin count so that's for out in set and side set and then there's also this exclusive pin use this is just a like a helpful thing to say like i'm the only state machine that's going to use this or not um kyle ballard asks what is the best resource for understanding wiring on microcontrollers i had 20 years of development experience but zero with electricity um i think the the wiring part is like what you're gonna get with a lot of tutorials like telling you how to hook up an led so i would just look uh for adafruit you just go to learn.adafruit.com um and there's lots of like beginner guides that will talk about the wiring side um and remember like this rp2040 is a microcontroller so even if you're following a guide that doesn't have that specific chip a lot of it's gonna apply across um so yeah i'd recommend just like go to learn.adafruit.com if you want to learn the stuff off off the chip the hardware side um i'm totally with you like i i'm a software developer by training i learned all of the i i i'm a computer engineer by training so i did have two electrical engineering classes uh but a lot of the ee stuff i learned so you can learn it and adafruit was one of the places i learned it before i worked for them um okay so let's uh let's iterate on this pio example and just see how the waveform changes um you're welcome kyle that's what deep dives are for um okay so one thing we can do is well we should delete this comment because it's wrong so one thing that's weird is that we're not seeing 800 kilohertz out so let's see if we can change this program so that it is 800 kilohertz uh first let's simplify it by removing um this set pin direction so what this allows you to do is um it tells you it's an output um and in fact we're doing that with a knit instead so we could just delete that and we'll get the same thing to happen so if i just run this again we should see the same right we're still at 400 kilohertz or or so um so let's count cycles on this and this is the reason the pio is really interesting is it's designed to be cycle accurate so the first instruction so this is a again is a label so when you do jump again it will go back to where that is um hi alvaro um so set pins one and then in brackets here is the delay so what this will do is this instruction this line will take two cycles it will take one for set pins one and it will take one for the delay so that's two cycles and then there is set pin zero which takes one cycle and then there's jump to the top again and that take takes one cycle two so there's four total clock cycles in this loop that we're running so um this frequency is uh how long it takes for one clock cycle um so if we wanted to actually get a square wave that was 800 kilohertz we'd multiply this by four so let's just do that let's save and i should show that the rebel is you can see here so what it's saying is the real frequency so the 800 kilohertz is 3.2 megahertz so if we if we just do our logic pro again we can see it's a lot narrower uh but it's still not it's 1.6 megahertz and my settings turned up yeah my settings are turned up all right well let's keep playing around with this i had this working before what i'm expecting to see is 3.2 megahertz so it's still divided by two um which could be a bug as well but let's keep let's do the the fastest thing can you do the one twice is longer than the yes so what we could do here is we can actually just say like okay let's make this delay of 3 and see what it looks like so now what we can see is that this top one is four eight 1.2848 and the other one is 6.24 um nanoseconds so it's it's twice as long here is there oh it was and if we wanted to make now that this loop takes six not four we can adjust it here so do that and stop and yeah we can see the frequency there is 800 or so so yeah i think our math is right gareth says love how the try commits test cycle is like two seconds 100 and this is the thing with circuit python is that circuit python its goal is to make code really quick to run and iterate on um and so it like circuit python just detects when the file is saved and tries to rerun it um bye mister certainly enjoy dinner it sounds delicious um okay so let's get this down to the minimal square wave because this will allow us to talk about something else so um right now we have we have six instructions there are six cycles if we drop this to one that gets us back down to our four but there the state machine has a feature called wrap and what it allows you to do is it allows you to set the bounds of the program that the state machine is running and so if it the so the program counter counts up and when it hits that bounds it will automatically go back to the part you told it to start with and but by default circuit python will just set those bounds to the bytes of the program itself um goodnight dave thanks for hanging out okay so what we can do is we don't actually need this jump because using wrap in this case automatically will all just go between the two instructions so what we can do here is we can do that and because we have this one delay so david says i don't have a scope like that is it possible to do a low-cost scope with clue or other board with a screen you know what the rp 2040 is like the perfect thing to make a low-cost logic analyzer out of um we haven't done it yet but it's like the perfect thing and the reason it's the perfect thing is you could write a pio program and they've done this it's it's in the examples where it just every like you set the clock to 125 megahertz and it reads the state of the pins in at 125 megahertz um yeah so this is the perfect example we we should put something together um so yeah i actually um the pio is the is and this is you know one of the reasons i'm so excited about i was excited about this chip is that um yeah and you could even do triggering and stuff so you could do things like i some of you may not have known but i tried to make a circuit python powered game boy cart um and the game boy cart that i've designed is not reliable it like will run for like a minute and then like artifacts start happening and like it stops working and so what i really needed is like a thing to debug why that was not working and like the pio on the rp2040 is like the perfect thing to be able to like sit on the gameboy bus and just log what's happening until like nothing's happening and then i could just see uh what happens before that um so and that's the same d51 and the gameboy car and i like i had so much trouble getting the same d51 to be like in sync with the bus of the game boy because the game boy is clocking data in and out um until i like fully appreciate like not having something at the very edge that can do things like this um so the pio is really cool and i think you know circuit python is not super real time but it orchestrates things that are so pio's a good example of that but also like that's why i um that's why i'm thinking about the second core not running python is because you could use it for a like tight just like we're writing like tight pio assembly we could write tight cortex m0 assembly um on the second core instead um alice tries says oh it's tempting to write a basic pico logic analyzer sport in sig rock if you want to help me with that i have a project called tiny logic friend that um i want to come up with a standard protocol that sigrok supports um that all of these micros could run on or use to talk with it so yeah um if you want to help me with that please i just haven't had the time uh but i would love to make just a generic tiny tiny usb based logic analyzer that could run on like all of this class of hardware um like obviously the i think the pico would be able to like do higher um like higher sample rate but you could do it on same d21 and stuff too and uh patrick thanks for putting the the repo in there skyrim support would be awesome yeah uh now i can't think of the sig rock yeah i totally feel ya um okay let's keep uh let's get this down so i talked about auto wrap um and so if we just delete the delay and hit save what we should be doing is kind of like going full speed so let's do now it's 800 kilohertz times two and let's see what we're getting here so now we're getting 800 kilohertz frequency uh with top and bottom so like we're there 800 kilo 800 kilohertz is just like neopixel speed that's why i'm using it um so yeah that's really neat and uh somebody asked how fast it could go so let's uh let's see how fast it could go so let's do 125 and then one two three one two three so that's core speed and oh i left the eight there i think it should have overflow converting long into machine word that's not the right that's not the right exception message for it being too uh too large um that's not a friendly error message okay it didn't crash though which is good okay so we're going full speed let's make sure the logic analyzer's full speed which it is david says do you have a d assembler uh no we don't um but it shouldn't be too hard to to write actually yeah toddbot says at least there's an error message okay so this is this is full speed and um it's important to note that i'm outputting a signal that's 125 megahertz and i'm reading it with a 500 megahertz signal so i i believe that this would be equal equal on equal off but because i'm like reading it not fast enough to see that anyway i think it's right i don't have any extra delays or anything so yeah i think that's right although it's like 10 and 6. um yeah luke says pio output will be 50 50 or something so sampling artifact is the right term um all right 3 30. okay so should i show neopixel so let's just do neopixel but we'll do it on um so let's talk about how we do neopixel and three instructions and this is a modified version from what the example code is in in the picosdk okay so let's let's change this back to eight times six not that slow eight hundred one two three um right they support low io voltages it's the celia's fault it doesn't look perfect um okay but now i i named it program which is like super unhelpful um oh and we have to write something to it and it's side set wait let's just pull up the library i think i might have it here we go okay so let's see if my example that i committed works so let's just um copy paste save okay it's going did i miss it i got something i thought oh no oh it's live it's waiting oh i'm on the wrong pin there we go so david says circuit python will use the pio and the user will want to use the pio how do you deal with that um right so circuit python wants to use one state machine oh fedex 1k are these for sale in the usa yet the board i'm using this feather um rp 20 40 is not um we're waiting to get more chips from raspberry pi but you can buy a chip that's a board that's running the same chip called the raspberry pi pico they are for sale right now and they just put more in stock at adafruit.com um so check that out they'll ship out on monday because it's late uh late on friday there but yeah yeah they're in stock um and if it's not in stock they put them in stock and batches so if it says like add my email just add your email and they'll email you when they set them more in stock um okay so um woohoo yes um so here's our neopixel output we can see that zeros are um 33 duty cycle and ones are 66. uh so let's talk over how that happens so um did i answer the question about how we allocate it so basically what we do is circuit python manages state machines it doesn't it presents you state machines it doesn't allow you to do pios um i have an idea so there are cases where you want multiple state machines on the same pio and so i have an idea of how i'll allow you to do that i haven't like figured out all the cases um so like most things in circuit python what i'm doing with the api is i'm starting from um the thing i want to do and as i want to do more things i will expand the api um it's kind of it can be an api design trap to try to support everything up front and we can benefit from the fact that micro python does so if somebody needs something that we don't support they can use micropython in the interim of course you're always it's open source so you're always welcome to hack on circuit python as well but yeah so circuit python what it's doing is it's automatically assigning state machines to to to you when you ask for one um so what my plan is to so you give it a program it sees how long it is and figures out can it fit in this pio if not put it in the other one um and then it also like there's tons of logic around like pin and use checking that i had to add so it if you don't want exclusive pin use what it will do is it will say is that pin in use by a pio that i'm trying to put you on and if so that then it will work otherwise it won't um and there's i when i was first working on this i had a lot of issues i i i just didn't set things right so there's a lot of checking as well of like if your program has an out to pins it will make sure that you provided an out pin for example so there's a lot of i try to like circuit by then tries to have a lot of guard rails so that if you're like mism if you mismatch what your program does with the with the pins that you provide like it should raise an exception and say like hey you need this or that um so that's a goal but it's a lot of logic and it's probably not all correct um but that's the goal of how pio works is that you say i want a state machine and here's the constraints about what the state machine needs and then we'll pick the one that works for you um so that you can so that we can share user use of of state machines with internal uses of circuit python state machines um so it actually when we do neopixel right now we actually like pick a pick a state machine every every time we do a transmit um which is a little weird but it works so that's good um okay so let's go over this um how this works so um we don't do anything with this pro program designation it's just a name um side set one so this is saying i talked earlier about like how delay the five bits of delay and side set are shared um what this does is it's telling the assembler like how many bits of uh side set am i using i don't know if it's how many bits or how many pins um i i don't know it's probably bits but i don't remember if that just changed the changes the way of like what a valid program would be okay so they could you can also designate wrap target so this is the start of your wrap area and the bottom of your wrap area this could be useful if you have like initialization code you actually do want to run um but generally like i right now i basically like you just it always wraps around everything um gamma game says i'm looking forward to the feather for lipo support do you think it will eventually be a version with wi-fi and bluetooth as well as a battery i know the board is already cramped i wouldn't expect us to produce a board that has it built in but there is already an air lift feather wing that should work with this um and it runs in esp32 and like we have all the code to use a coprocessor like that so i don't expect an onboard one but the existing airlift airlift stuff will work with us um because it only requires us by the spy connection um okay so let's take a look we've got wrap targets around the outside which i think the assembler actually just ignores the assembler is a subset of the of the real one so it's actually four instructions so there's these three labels there's bit loop do one do zero uh those are just labels that don't count as instructions um and labels are like a way to like easily get a value rather than having to worry about what the number is so the first thing you do is you do an out uh from it's an out so it's shifting out of the output shift register into the x register the x scratch register it is doing one bit and then it's doing a side set to zero and delaying one after that these instructions are powerful um there's also uh one also one other thing to note is that um if you can see here there's this auto pull which means that out will automatically one if there's no more bytes to transmit it will wait so it will stall so that delay could actually be more and then um the other thing it will do is uh it will automatically fill up if there is data it will automatically take that from the tx fifo and put it in the outputs shift register um so yeah that all happens here and it means that if you haven't written any data to fifo this is the instruction where it's where it's stalled um um yeah alvaro says cool asm library would be nice to have something similar for the risk 5 chips coming soon like the s3 it would also be cool for the second cortex m0 in here i think um correct yeah and bruce points out that the arduino nano rp2040 has a built-in wi-fi chip um which is probably running similar code to what the airlift is um okay so the first instruction is let me get in one bit from the output shift register and then because like we're not transmitting like any sort of like the actual bits so to speak right like we're not writing directly to the pins um what we're doing instead is we're changing our behavior based on each bit so um the second instruction is a jump and it's based on not x which i think is basically like checking if x is zero or not so if yeah so if it is zero so we shift it in one bit if it's zero we do zero um and concurrently so side number is uh concurrently at the same time so if we're looking at our logic signal is low then we're doing this jump it goes high and then we have a delay of an extra cycle and then and then it goes to if it's a one it goes here or if it's a zero we go to do zero so to do zero we do nothing we just we do a side set that drops it back down and then we delay another cycle if it wasn't zero so this jump passed or failed then what we do is we do this jump there's no condition see there's nothing here we just go to bit loop but we side set one and we delay still so what that means is that if you are a one you get here so two cycles of one here two cycles of one here if you're a zero you get two cycles of one here two cycles of zero and then you get at least two cycles back up at the top did that make sense um so that's i guess let's go down here so uh what do we need to do what do we need to like set up the state machine with that program so we do assembled and we do a frequency of 800 kilohertz times six so six is the total number of cycles kind of in that in our loop um yeah it's a lot in four instructions exactly so like everybody's like oh 32 32 instructions is not a lot like you can do a lot um and the concurrency also means that you have more um like timing prowess right um four instructions um we initialize via a set so this is just making sure that the pin is set to output um we say first set pin is d13 just because that's what we're listening to or like scoping and then we also so set we don't actually use in our program right we're only providing that because we're using in our init program and then we also pins can be used by the same thing right so side set pin is also d13 so we we would be able to change it both in in set and side set um auto pull we already talked about um and then this output shift register is interesting as well um dexter says is this microcode um i guess you could think of it as microcode like it's it's definitely like lowest level um yeah it's um i think it's okay it's assembly and unlike like assembly is the api that that like the instructions talk to the processor with and then in really complicated processors there's microcode which dexter is talking about which is like further translation that the cpu does under the hood to make it run faster which like intel and ryzen will do but i don't think that there's that here so like what you're doing in the state machine is like you put it in memory and it's reading that memory directly there's no like intermediate between like what it executes and that um and they it reminds me to say like i think this is actually for somebody who wants to learn how to use computers this is a great like wrap your head around the fact that that computers are number machines um like i think it's really exciting that like as you're seeing here we're providing a way for you to experiment with the very lowest level of like how computers work but in these bounds of like circuit python and fast iteration and things like that so i i think this is a really cool chip to like okay you want to get in the weeds like here's the guard whales but here's how you get to the weeds while you're doing those guardrails um so yeah i think that's really cool so output shift right just means like whether when you take a bit or more multiple bits like which way it goes um and that can change in this case um like which uh which bit gets transmitted first um so that's that impacts this and circuit python will so the fifos are always 32 bits so if you write eight bits to it circuit python will automatically put it to the right or the left um yeah and one is pointing out that this is the gateway drug to get into fpga development yeah so i think this is like the lowest level you can get with an asic meaning like an application specific integrated circuit um where you're thinking about timing but that timing is within the context of clock cycles um if you're if you're uh if you're in fpga land you have to worry about like how long your wires are and like that's another ev that's a level even deeper um but that won't get you here so dave is saying uh are we going to be able to program the other m0 and assembly language of circuit python that's kind of what i'm thinking is actually more interesting than just doing threads um but somebody would have to write an assembler for cortex m0 so so you could write similar syntax and it would produce the bytes i think that would be really neat um so like you're you're trying to do something in a pio state machine you can't do it you can't do it you can't do it figuring out how to be like all right i'll write you know like 10 lines of assembler for the cortex m0 and leave it off on its way um i think that would be really cool oh graham says i added arm v6 support to micropython.native right so you could write translate micropython code to arm v6 i'm not sure we have micropython.native enabled i think we do but we certainly don't have the oh sorry the assembler the piosm asm the the c version both it has an assembler too okay interesting you should email me links to that we'll see um just in time compilation on the microcontroller it's the future i agree oh and microdev is pointing out that like and this actually came up this is something i couldn't talk about but microdev was talking about because the esp32 s2 has a risc-v core for the ultra-low power processor so uh the way that we manage another processor from circuit python is potentially something we could apply to all like these other cases where we have a separate thing as well gamma game says being forced to write assembly in university made me learn more about how computers work than most other classes it also zactronics games much easier to understand yeah right so it's cool you you'd be able to um ask patrick says is this a standard assembler or is it specific to the rp2040 it's specific yeah it is not um yeah it's it's it's a custom instruction set architecture isa for short um it's only nine instructions really eight um david g says can i skip the assembler and directly provide the hex value you can yeah so so this like if we just change this to print assembled and find my terminal like it just is it's a it's an array so it's just buffers so yeah you can just provide that stuff if you want yeah and like i said and as luke's pointing out like the sdk docs are really really good so if you if you want to know more about it the the example abstracts stuff a little bit more um it allows you to like have a variable named t whatever and then uses that and delay but this uh pio assembler that i wrote doesn't do that yet it doesn't do any of the expression stuff um again like i'm trying to like start with a very minimal and go from there um okay and somebody i never covered this actually but um the question was how do i actually get the bytes to to the to the uh state machine so the way that we have it right now is you just say state machine dot write um and that will transmit in this case like three bytes um one after another it uses dma to do it but it will block until it's done um i actually had a bug where it wasn't actually blocking until it's done so i actually like was turning the pio off too quickly um so i actually had to figure out how to like not only do i have to figure out when the fifo is empty but i actually have to figure out when the output output shift register is empty as well before i could turn it off um dcds earlier i asked about getting exactly 800 kilohertz would you have to calibrate the frequency into the state machine instead of the 800 800 000 like it should be really close it the accuracy is going to yeah luke says oh that was the tx stall thing yes it was um to get exactly like the quality of the clock of the timing of the state machine is going to depend on the quality of the input clock signal which is like a crystal on the board um and then i don't know if like that the pll the thing that like multiplies that to faster probably has some like wiggle room as well um but remember like i'm sampling i may not be sampling it like perfectly well um like there's some timing related to when i'm reading these samples too so like it's 801 kilohertz is like super close like neopixels are not that specific so it's like well within the range of of what they expect um so david asks the rp 2040 will take a week to get here can i use that library on another circuit python board just assembler library you can use the assemble assembler library and see python um it has it's just doing a like parse text convert to bytes sort of thing um it's not specific at all let me click through all my windows so if you want to see it you could do the github adafruit i'm gonna start to wrap up but if folks have questions put them in the in the chat now and i'll get to them um so it should be available uh this p-r-p-i-o-a-s-m should be in the um should be available in the bundle as well i got it in last night um a question for luke how are you planning on handling ip for the pio close licensable open architecture open source whether people can re-implement something that works with the same isa so this is a so for all of you who have not understood what risk five is risk five is very similar to this it is an instruction set architecture um and arm armin and x86 are famous for like you can't implement something that implements this thing it's like custom to us as well um and so that's why risk five was created risk five was saying like we're going to agree on the instructions that we give to the cpu the implementations they have some open source implementations of it but those are not necessarily like um they're they don't have to be right you can have closed source risk five chips um risk five is all about that like api boundary which is the instruction set architecture um and so that's the that's a question for the raspberry pi foundation folks is like whether they plan on keeping it um the instruction set architecture or even how it works closed i imagine that the best you'll get is the isa is free but um i don't know that's a question for them and i i don't know that's not on me um but yeah so if we just look at this pio asm thing you can see i just have some like this is the like source destination thing so it's how we map to what the value for the bits is um it's just a very straight let's 167 lines of my terrible python so it splits the program it figures out where all the labels are it takes out some of the defines um and then basically like it takes the instruction it does delay and side set in a uniform way and then yeah so that's delay inside set here and then just based on the instruction like start with a 16 bit value and then or different values into that which is if we go back to the data sheet exactly what this encoding thing is so if while i was just looking at this and i'd say okay i'm going to do a jump i parse the jump and then i the delay side set stuff is the same and then putting in the the other bits here um how novel is it is it patentable uh that's a great question i'm not a lawyer i've seen like the beaglebone prus and the flex i o on the imx's are similar as well um yeah everybody thinks it should be open i think but uh i don't know the legalese around it i do know that like arm and stuff is uh that right chris ward says what does this example do this is just a small bit of what is required to control neopixels right so those three bytes you write are setting a color selecting a pixel uh they are um they are color values um so the way that neopixel works is um it's a big long chain and there's uh you send three values and the first pixel grabs it and then any other values it gets it just forwards on to the next one so the way that you address it is just like you when you refresh neopixels you have to provide uh like you could theoretically do like the start of a chain uh but you have to like provide between the first one and the nth one that you want to update you have to provide pixel values for all of those um so there's no like addressing in that way um uh yeah the color the color loop is constant what you're seeing it change here is actually like circuit python telling me it's done um oh yeah command says i i took a good look at flexio yesterday because of this it's so much less than pio i think pio is what they wanted it to be honest yeah i i've never done a lot of flex i o so i couldn't say but um the pi l is really neat um so yeah so so this is basically the this is the timing sensitive bit of neopixel um it's just transmitting the individual um pulses that indicate all the bits that's the thing that's usually hard um so it's like gr b or something like red green blue um i could make this twice as long but you wouldn't see anything because i only have one neopixel here right now it would have to be connected to a second one um right the assembler language the the assembler library is not i mean you're going to get bits out they're not going to be useful um because to be useful you have to hand them to a state machine but there's no reason you can't run this bit on anything um i just built a raspberry pi tank and it's simple um yeah i think let's see is there anything i want to cover it would be nice if this controlled the stuff instead of like an arduino i don't know what you mean i fully like if i had to guess if i had to guess i'm gonna i would expect like the raspberry pi five or whatever they release next is going to have one of these on board to manage all the real-time stuff right like this microcontroller makes so much sense in the comparison um it makes so much sense compared to what a raspberry pi can do because a raspberry pi is like meant to compute a lot of stuff it's not meant to be like very responsive to the outside world um so yeah and it looks like the picos with headers are still in stock so if you haven't gotten one yet um you can grab the adafruit.com um yeah ryan g says can the pios do dma yes they can so the each of the fifos has a dma request line um so you can do it it can say like hey dma i need more or i have more for each way and um the yeah the memory the docs are really good so the memory system is described in system functions yeah so here this is cool core zero core one system dma right and then you have um 16k rom you have your four big srams for 256 and then you have uh two smaller srams uh four and five and the reason that those are interesting and the reason that i think this chip is really cool i mean it's well documented which is good but it's also important to know that um uh each of these sram blocks can be read and written at the same time um like there are limited resources outside of a cpu as well and i think that's really cool to know that um so they go into details about like how dma decides which thing it's going to do um seville asks can the board show up as a keyboard connected to a pc yes it can a lot of circuit python boards can and this one can too it's known as hid human interface device and um i'm surprised i guess i'm not on my mac but when i plug a new board in on my mac it will say like hey you have a keyboard um so it is actually showing up as a keyboard right now you'll have to program it to do that um [Music] seville says what is the state of gui development in circuit python is there a framework or a library for gui development foamy guy and tg techie have been doing a lot of work on the framework side um the display io side hasn't changed a whole lot um but i think it's it's well positioned to be able to build widgets and stuff like that so it's getting there i wouldn't say it's comparable with a little vgl because they've done a ton of work it's all c um but it's getting there and i should also point out that uh because we have spy implemented uh and i squared c uh display io is enabled on the rp2040 already um you won't be able to do parallel buses yet um but anything that uses like four wire or four wire or uh i squared c should work on the display side on the rp-2040 so e-inks oleds um lcds should all work gamma game says so it'd also be able to show up as a controller uh that might be interesting for making something ridiculous to place dark souls with uh yeah definitely it shows up as a controller as well um and i think there are examples it shows up as a standard like it's called gamepad in hid terms and uh so it's like a standard like two joystick uh four button sort of layout that it does by default um and somebody points out you could script it to play as well you totally could um yeah so uh you know one of the strengths of circuit python is that it's usb stuff so it shows up as a drive for your code edit it uses a serial link to show you the errors but it also shows up as a mouse keyboard gamepad and then it has midi as well so it can do midi control for like playing music david says do you have a checklist and priority for the features you want to enable when you have a new mcu on a new board uh i don't um i don't if you want to see what's coming for for the rp2040 um you can take a look at the issues list and there's a label for the rp2 now um so that will cover that um generally there's with a new port like getting usb to show up is hard in order to get flash working like get the circuit python so if usb is working you can get serial kind of communications so that's the very first thing second thing is you get flash reading and writing so you can write a code dot pi and then like once that's there it's kind of you're like a bit of a like choose your own adventure in terms of like digital i o is one of the first ones you want to do bus io because so many of the libraries use bus i o um neopixel is nice for like the status neopixels um so it's a once you get usb going it's kind of like a what's more important um but yeah it's it wasn't super bad um it wasn't super bad i have one of the hdmi adapter boards for a five inch display from adafruit i'm hoping to create a gui for a project i'm working on a candidate for display io um i don't think so because we don't um the hdmi adapter boards usually take rgb 24 in and at the moment we don't we aren't able to produce that from display i o but if you really want hdmi the real thing you should do is i want to do bare metal on a real raspberry pi um so that a raspberry pi would show up as a circuit by drive but be able to output like if you do it on a pi 4 or you do it on a pi 4 compute module like then you can have dual 4k straight screens from display io which would be ridiculous uh but also so awesome uh david says you could forget uh rotary i o if nobody complains yeah i mean there's a there's a bit of a like if nobody complains why implement it i think this chip is going to be popular enough that you will see us add all of those things uh but rotary io is definitely down further down on the list like i don't have like uart isn't implemented yet so if like uart is probably something i'll do next week and um audio pwmio would probably be cool too um graham says you can't sell luke short on his pio based dual screen dvi i mean if he wants to add it so that it's on the second core that sounds awesome to me um okay gareth says last question with pike or python being the official system your thoughts on how circuit pythons should be defined um i've thought a lot about this uh you know i would love to see you know circuit python be mentioned as much as micropythons being mentioned but at the same time i'm very happy that we don't have a like i'm very happy to evolve apis and that's really hard to do if you have a book um so i'm very happy that like none of the circuit python stuff is in a book um and it didn't need to be done uh prior to launch like we can evolve it and we can get a feel for how people are going to use things um so yeah it's a it's kind of it's mixed feelings for me i would love to see it right alongside micro python um but at the same time i think you know i want to get the word out like i think it is the best experience um because you plug it in you get a circuit pie drive and you can edit the code on it so try it tell your friends um we we have written up like a like comparison so i think circuit python is easier than micropython especially on the rp2040 because the rp2040 micropython doesn't show up as a drive um you have to use it with thoni it's it's kind of what they expect or some something else to transmit the files over so i think circuit python is definitely easier to use but micropython has the like more advanced stuff covered that like frankly isn't a priority for us so if you do want to run python onto cores if you do want interrupts into python um if you do want all the features of the pio like micro python is a better choice because it is comprehensive um but besides that and for the most of the things that you want to do like circuit python's going to cover you and as as we find uses for pio that we can't do now we will add things like one thing that circuit python's really going it has going for is like we're not static like we're going to continue to work on this we're open source we take poll requests we have that stuff down gamma games asks will there be an extension for vs code to use circuit python there already is one and in fact one thing that circuit python does really well is um all of our apis that are implemented at c are still documented in python stubs which means um editors like vs code can read those python stubs and do auto completion for you um so yeah i think there's a lot a lot to argue there um gareth says i agree full features are less important than good docs community and responsiveness um and i should say like there's nothing stopping you from trying circuit python and micropython to figure out which one you like just be aware that the file systems are different so back up your code before you do that um but yeah try circuit python that's that's the message i want want people to uh to get away with oh it's just so many good questions okay let's um how do you feel about it being used in education like as a college ee course before inter-embedded systems that way students can get used to concepts like i scored c protocols before worrying about learning about the embedded level i don't know what you mean by abetta do you mean like concurrency and rta stuff david says is this the first board where we can really compare between micropython and circuit python yeah i think to some degree like there are chips that run both but like this is kind of the first one where we're both really trying to fully implement it um like micro python has cmd support but it's like very very limited and circuit python has esp32 s2 support but micropython has esp sport um oh lady ada points out uh the stm32f405 feather runs both pretty well um so yeah maybe not the first one but yeah another good comparison keith i think i think this is a great first board it's inexpensive it allows you to get into these like cycle accurate what is a state machine i'm crunching numbers sort of scenario which i think is really cool um command says does embedded meaning mean fighting with poorly named registered on polarly documented chips well that this one does not apply to that this one is so well documented it's a breath of fresh air um alice tries points out like rp2040 looks like the perfect chip for circuit python all reflashable over usb 100 and you can't mess up the bootloader either um like the bootloader is burned in like you'll never you'll you'll never not be able to get it i would love one caveat for those of you who use circuit python on other boards right now double tap to reset does not work uh reset into the boot loader it might in the future if you already have circuit python uh enabled but there's no way to guarantee that that works so boot select is going to be a thing for a while [Music] hmm lucas says i'm curious if circa python will get the ability to enter repple programmatically with predefined variables like run repel on the blackberry keyboard feather i haven't seen how that works um generally versus micropython circuit python tries to clear the state before running code again and so all of state all all the state is cleared um entering the rebel so i think i think that's what you're talking about wish we had these when we hacked xboxes i know right there's a lot of like retro computing stuff i want to do and this is a really good like dealing with a like a single megahertz sort of signal like should be totally doable in this um oh the other thing like micropython versus circuit python is like we've been very strict about having a common api across all of our boards in circuit python which means that all of our libraries generally work um if if like a board can't do something the module for it won't be available akuza tuna said but will it fit in a game boy probably oh yeah i should drink water i haven't been drinking a lot i have a glass i'm only halfway through it though so you're right i've been like i'm so amped like i was so excited about this chip i think it's very cool so command is saying in the docs they say you have to install the universal universe build universe build chain um i just switched to my linux box and you just need arm gcc um i guess the universal build tool chain is only for debugging so the gdb that they use is the multi one because it because of the two cores um which i did do a little bit of when i was debugging it first i wish there was more hours in the day to play with stuff i feel ya it's very it's a very weird case for your hobby to be orc um and there was a there is a bbc emulator that somebody put together too oh yeah and you can't see me sorry when i'm just answering questions i i should definitely have it on my face um okay let's wrap up the cat is up in the window watching out and it's actually kind of hot in here um my cat's got a kick out of the sphero which i have i have here too let's see did i cover all these tabs the magazine the blog post getting started feather uh yeah so if you do want it let's see uh the picot itself is out of stock but the in stock now you can't see my screen um adafruit.com slash product slash 4883 has the pico with loose headers included uh so if you want haven't picked one up yet check that out um thank you to dcda i imagine that has been doing time codes i definitely did not um so thank thank you for that um adafruit.com support adafruit which supports me they pay me to do all this stuff as folks are saying uh if you haven't subscribed to adafruit yet please do there's lots of great technical content on there um click the bell if you want to see when we go live i guess uh this has been a deep dive uh we dove deep which is awesome and exactly what we're here for if you have more questions well deep dives happen fridays at 2 p.m pacific so you know two hours previous from now if you have questions about the rp2040 you can find me and a lot of others on the adafruit discord server which is around all week not just during this time so if you want to ask about circuit python ask about the rp2040 that's where you can find me you can join the adafruit discord server by going to adafru.it discord let me type that out and copy it around although i think folks are in the chat and in that um i think you should i think it's safe to assume that uh next week will also be about the rp 2040 so uh if you don't ask questions in the meantime you can find me here next week on that and hopefully you are will be done maybe the audio pdm pwm stuff too um we don't have random implemented i don't think it's a random number generator uh so we'll have to figure that out um but yeah thank you all uh it's been uh such a pleasure um and sorry that link doesn't actually pleasure to have you all uh talking about this exciting new chip from raspberry pi um if there's another new chip uh well i will have not worked on it um but super exciting uh congrats to the raspberry pi team for getting this out i think it's going to be something we're using for a while and luke confirms there is a true random number generator so i'll have to add support for that too uh until then check out circuit python on the pico uh it's not official but adafruit is supporting me to support it so expect it to be getting better better over time and with that um the cat's watching out the window so i'll say goodbye and chat with you on discord and then stream next week
Info
Channel: Adafruit Industries
Views: 18,129
Rating: undefined out of 5
Keywords: adafruit, electronics, diy, arduino, hardware, opensource, projects, raspberry, pi, computer, raspberrypi, microcontrollers, limor, limorfried, ladyada, STEAM, STEM, python, microbit, circuitpython, neopixel, neopixels, raspberry pi, circuitplaygound, nyc, make, makers, micro:bit, adafrit, adafruit promo code, ada fruit, adafruit coupons, raspberry pi zero, micropython, machine learning, ai, tensorflow
Id: LXAwW2IYT7o
Channel Id: undefined
Length: 148min 40sec (8920 seconds)
Published: Fri Jan 22 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.