Meet Raspberry Pi Pico – LIVE | Digital Making at Home

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone thank you for joining us for today's digital making at home live stream if you haven't already say hello to us in the chat let us know where you're tuning in from i'm mr c coming to you live from cambridge in the uk and back once again is the sparkling christina how are you christina sparkling you always have such great adjectives hi mr c it's so good to see you how are you doing today yeah really good thank you i'm on a mission to have a new adjective every time you come on by the way it's the thing that i'm trying to do i love this mission i love it so much and hello to everyone i'm joining from nebraska in the united states and thank you to everyone who is joining us from your homes all over the world today is going to be great and you know what mr c it's funny because normally at this point in the show we'd be talking about some tech news but this week is special like super special because we made some of our own tech news and we've actually got evan upton here one of the founders of the raspberry pi to code with us on the brand new just released shiny exciting raspberry pi pico absolutely i'm very excited to play with the pico it was only launched last week and it is such a cool gadget like we're going to talk with eben today about what raspberry pi pico is how it's different from a regular raspberry pi computer and then we're going to do some coding with it yes maybe we'll try out some analog inputs something that's new to the raspberry pi family and a really useful feature and also it runs micro python which is what we'll be coding in today so you can see the starter project at raspberry pi dot pico oh sorry raspberry pi dot o slash pico dash go check this out it's a great starter project and if those terms don't sound familiar that's okay we're gonna be this is an introduction to pico we're gonna be going through those together today we already have lots of folks in the chat i can see you it's so great and we also had folks in the chat early so special shout out to larry apron coding for kids in iraq great to see you getting involved already welcome we're so excited to have you in the conversation please keep letting us know where you're joining us from absolutely and for those of you who are joining us for the first time welcome to digital making at home it's all about getting young people just like you coding and creating things with technology every week we chat with cool people like eben we code together and we see amazing digital making projects from all over the world we're broadcasting live right now to youtube facebook twitch and twitter and that's every wednesday we can see your comments in the chat on all those platforms and we do want to hear from you so feel free to ask us questions make suggestions or just make your opinion known in the chat make sure to like and subscribe as well or head to rpf.io sub to get all of our content as it comes out yes subscribe subscribe you may be thinking hey i thought i was already subscribed to the raspberry pi's youtube channel well this is our new channel which focuses on kids and the educational work that we do you'll find great tutorials for young people here and all the product news on our other channels as always so special shout out to martin andre and ellie some of our newest subscribers thanks for being part of the raspberry pi community absolutely all right yes let's bring on evan absolutely ebony there how's it going how are you skipping everything good yeah it's good it's been a incredible few days right um yeah congratulations big congratulations at the moment but yeah no it's been great it's been really really good because we're already the nice thing is we're already starting to see people this is the bit kind of five six days after launch where you start to see people really using the stuff you've made and that's so that's been a great couple of days yeah there's been some cool ones i saw some really nice projects coming up on the internet lately it's the one i really liked was the home security system powered by pico i saw somebody do that with the pi camera a bunch of other cool stuff yeah pretty advanced right i mean that's kind of that's a little bit beyond what we were expecting in the first week absolutely yeah i mean it's brand new for raspberry pi to the pico like if you had to explain to our audience who remember our like 10 year old kids and things how would you describe the picker to them okay well raspberry pi is a raspberry pi regular browser we have a big raspberry pi is a computer it's a pc um it does everything a pc does um it does all the good things pcs do like surfing the web and running c compilers and things but it also has some of the the downsides of a pc so in particular even at its lowest power it consumes quite a lot of power so it can consume maybe a watt of power at least and that means if you're running off batteries you need a big battery if you want to use it for a long time um another thing about the big raspberry pi is that it um only has digital i o so it can only only think about ones and zeros when it's interfacing with the world um where sometimes it's nice as we'll find out fairly soon uh to be able to uh interact with the world in a more analog way because the world is really analog and so what what's what raspberry pi pico is it's a micro control board it consumes much less it can do less but it consumes much less power and it has a few of these things interfacing capabilities that make it better suited to some of the kind of bits of digital making that traditionally raspberry pi hasn't reached into very cool yeah i love it i've got one it's like right here actually i've got mine here just for the size comparison here's one and it goes actually here's the actual beast the original pi or the pi 3 here so you can see the difference in size everybody they're quite quite different you can see that they're much smaller form factor here for embedding and all sorts of cool stuff all right we'll get onto that in just a moment the cool thing was that someone just put a picture on twitter the other day of it next to a raspberry pi zero which is kind of the small the little the little big pie the smallest of the big pies um and while we all think of zero as being this tiny little thing and it just powers over pico it's just it's a bit longer and wider and taller uh and pico's just sat there next to it so it's kind of cool to make small things and of course one of the wonderful things about the pico program is that the chip what's the coolest thing about pico we made the chip on pico so for the first time this is a raspberry barley where you can see the little logo our logo on top and that opens up this new world to us and in particular what it lets us do is take that ship and give it to partners like adafruit and sparkfun and pimarani and an arduino um who are going to build chips are going to build boards based on the chip and some of those boards are even tinier um i think adafruit and both have these tiny they're barely bigger than the chip itself have very few pins on but if you've got to squeeze it into a small space that you could never fit a big raspberry pi into then that's that's going to be awesome that's really incredible there's just a lot of excitement in the chat with folks from the uk denmark puerto rico hello alex and brazil nigeria there's also someone in peru saying like they're waiting for their pico to arrive lots of excitement just around the world for this yeah very cool i mean it is such a really cool design and like you were saying that you designed the chip right your team designed the chip that's right so the team here at raspberry pi trading um uh designed um the the chip from scratch i mean these are people who've been i mean this is this was this was let's import memphis we have people here who have been designing chips their entire lifetime their entire lives we have people here who uh probably 40 years i think probably the longest that anyone here has been designed chips since 40 years and you think that's all the way back you think what the world was like 40 years ago you're talking a world where the bbc micro um launched 40 years ago so that kind of like quintessential uh british 8-bit microcomputers 40 years old so you have people whose experience of this goes all the way back to that time when you can really only fit a very few transistors on the chip um and spend time working on it it's a beautiful design and it's a really really really polished design and it reflects people are really at the top of their game working on it for a long time and being given the kind of freedom we try to try to give them the freedom to to do their best work yeah that's incredible for most of the people who are watching it for me as well like to be perfectly honest designing a chip the thing that goes on inside the chips is almost like magic right it's like voodoo that was my question how do you how do you begin designing a chip like where do you start designing a chip for logic like what's interesting right because it's all built up like like everything in computing it's all built up from very very simple bits and the simple bits are literally bits um and the the they are they're very understandable like some somehow it always feels like both ends of computing to me are kind of understandable so you have logic gates down the bottom end so you have you know an or gate two input organs so you've got a little logic a box black box uh and you have two inputs into it and if either one of those is a one which is usually represented as a high voltage as opposed to zero voltage and then the output is one and if they're both low if it's then the output's low and so it corresponds to your idea of what or means is is this true or this true oh one of them is then the statement this all that is true if neither of them are true then the statement is false um and so these things they correspond to very natural kind of boolean logic corresponds to very natural things that we say in our everyday language and so that's very very comprehensible and really what chips are built out of is little silicon instantiations of those gates um and then at the other end you kind of understand what your computer is doing you can use the desktop environment on your computer and it's just that kind of trying and a lot of what i know a lot what you guys do a lot of what we've tried what we wanted to do when we founded the raspberry pi foundation was to give people it doesn't have to be incredibly detailed but some kind of understanding of what all of those steps are between those two very comprehensible ends um there's a course i think there's a course called nanta tetris which is kind of out there somewhere that tries to teach you a little bit of all of the all of the steps between a nand gate which is another sort of logic gate and a game of tetris and at the end of it you kind of supposed to be there playing tetris and you have you don't know in detail but you have some idea of what all of those stacks of it's all about abstraction the thing that makes computing doable is abstraction so that so you don't need to understand the detail of everything we don't have to speak in ones and zeros right we have all those layers of translation from us to python to the machine it's still good but yeah the abstraction is a strength of the weakness so it's a strength because it lets you let's be sit down by the javascript program um uh in to run at a web browser without worrying about what the logic gates are doing but it's also a weakness because it can kind of you can end up with a very hollow understanding a very shallow hollow understanding of and that's why i think you know that kind of the nanta tetras the layered thing just give everyone a little bit of understanding and it helps you do a better whatever layer of abstraction we have people here at raspberry pi who are doing engineering all sorts of different layers of abstraction but what they all do because they're good engineers is they have some understanding of what's underneath them and that helps them do a better job at their current level there's a really great question in the chat evan and they're asking how did you manage to keep the cost down on the pico so much like how is it so cheap for what it is well it's tiny i mean it really is tiny the um if you were to um in fact so chinese somebody just a beautiful set of x-rays um of the pico and the chip packages you can't even really see the dye so you've got that black square in the middle of the board that's the package but the chip itself and that's uh my head i think it's a seven by seven millimeter package but the die that's inside that is barely more than one millimeter on the side it's it's 1.4 mil on the sizes two square millimeters of silicone just hiding right down in the middle of that massive hulking package there um so and what that means is when you make silicon when you make chips you make them all away from a wafer is kind of the size of an lp right it's about 30 centimeters 12 inches across um and you can fit 20 000 um uh um rp 2040 die into one of those wafers so even my wafer is quite an important thing to make take that expense and divide it by twenty thousand and that tells you how much silicon is in each of these things you've then got to put it in a bottle you've got you've got to buy the package you've got to put the silicon in the package you then after you've done that you've got to test the silicon to you've got to test the finished goods you want to make sure that they work properly and some of them won't you throw those away and then you have to you have to charge enough for the for the for the ones that work to cover the cost of the ones that didn't um but even so you know the economics of the economics are very good and you know we were able to get the thing out for four dollars which is um which is amazing right it's the cheapest thing we've ever made we with raspberry pi 400 the raspberry 400 kit that we did before christmas and a hundred dollars that they come for a complete pc that's the most expensive thing we've ever done and it was kind of cool to follow that immediately with the very extreme cost yeah and folks actually subscribers to the hackspace magazine are actually getting this for free which is really neat it's coming out with the newest issue can you tell us a little bit a little bit about what is hackspace and why everyone should subscribe yeah our hackspace magazine is our so magpie magazine was the was the first magazine we did at raspberry pi it's a magazine about raspberry pi um hackspace was kind of our attempt to um to kind of broaden out our the audience because of course you know we have this big focus on computing and digital making um and so really wanted to make something that spoke to the entire maker community not just people interested in computers and not just people interested in our computer and that's so that's what hackspace is we've been running it for about three years now very it's been very popular very successful like all of our magazines you can download a free copy as a pdf on what every every issue the day it comes out you can get it for free or you can buy a physical copy at the newsstand in the uk and north america or you can subscribe to it one thing we've always liked to do when we launched raspberry pi zero we put a free raspberry pi zero on the front i still remember we ran this wonderful social campaign um the the week before where we the topic says free the banner at the top says free raspberry pi um and what we did was we did a thing where it was in brown paper it was just a series of images that got tweeted was wrapped in brown paper and then tearing the corner off and it said free and people first of all it's just brown paper next time raspberry pi and people like oh i wonder what free raspberry pie um sticker free raspberry pie beer mat and then the last day was just torn off and there's nothing after the world transport in the banner um so we and that was amazing and there were people besieging um okay and then all the news handwritten signs saying don't we don't have any more magpies amazing and there was no way we weren't going to do that again obviously it's a slightly weird time because not all news agents are open it's not necessarily we don't necessarily want to encourage you all to you know um put yourself at risk in order to get your picture it's great product not really worth the risk um but if you happen to be somewhere and news agents are essential businesses in the uk um if you happen to be somewhere again you're doing it in your essential shop absolutely pick up copy hacks basically or subscribe i just would say that i love getting my copy every month i love getting a hackspace come through my little box every month it's just like one of those things oh it's one of the wonderful thing actually we've done recently is we have these these pdfs and one thing we've never really given people we often people would mail us and say look i'm downloading your p i live in a country where you i can't get i can't get hank's base or it'd be prohibitive for me to get a subscription um i i'm downloading your pdfs and i'm feeling bad about it um uh what can i do and so recently we allowed people to make a little contribution towards the towards so effectively to buy some payment by the pdf really really really great take-up of that you know it's it really is a thing where it's obviously resonating with people and it's amazing it's whenever we've done anything at roswell we're going to be doing this 12 years now um and you kind of throw yourself on the kindness of strangers and you discover that strangers are wonderful actually and there are so many good-hearted people out there who want to help us do this stuff yeah definitely no very cool should we crack on and start doing some coding now just um yes yes we keep talking obviously and i'll sort of like code away the background make sure you catch any of my errors eben just in case um so we'll move forward everybody just if you want to get the instructions and follow along you can see them here they're rpf dot io slash pico dash go and this is the new projects that we've put on and there are a number of steps you can see in the menu here there's a number of steps the one we're going to be doing is the coolest one in my opinion which is controlling an led with the analogs because that's the cool thing that the pico does and the other raspberry pi haven't done in the past and you can see here so we've got this step of the project there's a bit of a wiring diagram here and i've got my work my work top on the side as well so we can bring my work top in and i'll show you my working my work with you guys are chatting so you can see that just here okay so now i've gone with the coding and the first thing you will need though everybody is you'll need to get the thoni ide if you're going to use it with your rajapaki pico and you can get that from thony.org so it's totally free you can just download it to your mac or windows or linux machine and run your multiply pico directly off of funny we've got the um you have to do a little bit with getting the code but that's all in the project instructions we won't do that today because it's really boring for you to watch that so we'll crack on with the coding part so we can see here's a wiring diagram everybody so i'll crack on with the wiring if you guys want to have a chat i'll just start wiring away yeah you're going to grill me on electronics now on here for sure i'm hoping you're not going to grill me if i want this hopefully i want you to tell folks at home don't worry i know some of you are saying like i'm still waiting for my pico to arrive that's totally fine remember this video and all of our past digital making at home videos are on our channel so hey subscribe and also go check them out so you can be you're able to access these anytime after um this stream and so it's it's super neat too i'm just excited mr c that we've got this new camera station set up like what other cool things that we can definitely do and also a reminder mr c starting on like step six of the project so there was a couple steps such as getting funny so don't worry like i don't want you to stress at home enjoy the show if that's where you are and have fun with us on it mr c is also showing off because he's showing off that he has the pre-release unlimited edition pre-release raspberry pi pico in dark green uh flash it if you got it right you got to go oh wow i didn't realize that nice yeah it's so yeah they're a a parcel a a secret parcel of secret stuff made its way from pie towers what are we calling them are we pie chow's north and your pie towers east or something i think your pie tower is in where pi central ah okay right from made its way from pai towers to pi central um uh back in november containing some of these little things um and yes that's the project that's cool so okay yeah mr steve what are you wiring up right now yeah so at the moment um i'm getting these red and black wires here running from the earth and the power rails uh on my pie into the side here so that i can access the power and the earth wherever i want them i just clip into those rails from where i am makes my life much easier and then what i'm going to do now is i've got a resistor coming off the end of the pico just here on the last pin and i'm going to run that through an led okay and i'm making sure that my led is in the right holes and that it is straddling the spine in the middle or the what do you call the gap in the middle evan what's your name for it everyone who comes in i ask them mine is the spine i don't know what you call it yeah void the void nice i've heard the cap i like void the void [Music] for sure and so i think you just mentioned resistor for so folks who are new to physical computing evan would you be able to like why did you even need a resistor when you're doing this type of project so um so you have so what you've got there is a light emitting diode um and what you want to do is you want to avoid shoving too much current through it otherwise it will get hot and burn out um because there's nothing really intrinsic to the led that's gonna that's gonna slow down so you know if you imagine um yeah leds seem a lot like light bulbs right they're not as we're gonna discover at the moment they're not in in lots of critical ways they're not like light bulbs um they they have they have very little resistance when when they're forward biased so they only light up like an interesting thing about them light bulb lights up regardless of which way round you connect in this one's only going to light up when it's forward biased when there's currents flying through diodes what is a diode a diode is a thing that only lets electricity flow through it in one direction a light emitting diode only lights up when electricity's thrown through it but when it's forward when it's reverse biased it has a lot of resistance it's really going to stop electricity going through it um when it's forward by scott almost no resistance at all um and so that means if you just connected across a battery enormous amounts of current are going to shoot through it it's going to get hot um and then it's going to burn out and so what that resistor there is just slow down the you know it's just slow down the the the the current a little bit uh and you'll end up in a situation where the the diode had one diode drops worth of voltage across it the rest of the voltages across the um is across uh the resistor and we know from ohm's law um what the um what what the current is going to be and we can therefore if we pick our value of our resistor properly we can ensure that um we limit the the current something that the led can handle so that's one way which it's not like so i think okay we've had two ways it's not like a light bulb one it only works if you uh bias it one way um two unlike a light bulb which has quite a lot of resistance inside the filament it doesn't have very much resistance when it's full of biased and everyone can burn out easily and we're about to discover kind of i guess probably should we lead into the sort of third way it's not like a light bulb i'm learning a lot all faded the way you fade a lot you know you know how to fade a light bulb right you put less voltage across um that doesn't work it's either on or it's off to a first approximation your led is either on or it's off and so if you want to um have an led which is a 50 brightness you're gonna have to think of something else to do and that's what this project is about nice yeah and just a reminder to folks they can check out this project at rpf dot io forward slash pico dash go all right looking good now what's that i see a red led and also points to evan for knowing for being able just to call out what led stands for i don't know if i could just do that on the spot so that's the massive led yeah i love the big one huge leds now what's the blueprint strange i've got like two leds they're really tiny like super bright ones all the way up to the big chunk of fat ones for the camera i found the big chunky fat ones the best so i love getting there nice work now what's the there i see the red led what's the blue thing yeah the blue thing is a potentiometer so it's kind of like if you have a dimmer switch on your light bulbs at home um it's that right so it sort of works it changes the resistance in the circuit so what we've got the pico doing basically correct me if i'm wrong evan is detecting the power coming through the potentiometer and as i twist it that variable resistance the resistance goes up and down and so as that changes the pico reads that change and then to change the voltage to my light bulb oh and what's the name that again sorry don't even know what you're going to see variable variable resistor um so this is something where you know what you're going to do is you're going to have if you imagine um uh a potential it's a potential divider suppose i have a rail which is at um five volts and i have a rail which is zero volts right and i put two equal sized resistors i have resistor resistor in series down there now what voltage i'm going to be at in the middle well we're going to be at two and a half volts if they're equal size resistors you're going to be at two and a half volts and what this thing does here is this lets you basically adjust those two resistors and if you adjust it all the way so that the top resistor is very small and the bottom resistor is big then well it's basically connected to five volts and if you do it the other way around or it's basically zero volts and you can kind of sort of convince yourself if you know that it's five there and zero there and two and a half there then as you make that linear adjustment to between the two resistors um and you in fact what these things physically look like is you have a track of some resistive material which is one end of which is connected to zero one that is five and then you have a pointer basically you have a contact and as you twist it that contact is a circular track and that contact moves around and so more of the resistance on the five volt end or more is on the zero end what that lets you do is it once you give uh now you've connected to the top end of the v3 i hope because it's not five volts um you've connected the top end to 3v3 and so as you turn that the voltage will appear which is somewhere at the range naught yeah and evan you actually just mentioned i like have a couple questions you mentioned like the gpio numbers like the three like 3v3 or like why aren't they sequential oh um why aren't they sequential around the board the gaps okay well down the left-hand side they are fairly if you look at it with the logo down the left-hand side they are fairly sequential so they start with gpio0 and they um they start with gpio0 they go down that side and then they're going to go around the corner and then they come back up and they're sequential then they get a bit gappy they do have gaps in them they have regular gaps in because we have ground pads so what we have is we have zero volts from time to time that's really good if you want to do very high speed work what you want to do is you don't want to have all of your if you're a lot of high speed signals you don't want them coming out gpios and then they all have to go back in through one ground pad you want to be able to go back in through a ground pad which is near ah there we are is that when you what you'll see is that the great there are some of the pads are square so some of them have rounded most of them have little rounded insides but some of them have squared off the pad the gold bit is squared off and squared off is the way we say ground and there you are you see them and they're labeled in black here so round and there you have two gpios a ground four gpios ground four gpas ground foreground two um and so those numbers are fairly continuous they're fairly continuous at the right hand side and then things just get a bit choppy further up and that's because what we have 30 gpios um and what we're doing is we use a few of them for our internal functions on the balls for example there's an led on the board and we use one of our gpios to control that led and there's a uh there's provision for connecting a battery and so we use one to actually use one of the four analog inputs we only expose three analog inputs from pico there are four analog inputs on the chip we use the spare one to monitor the battery voltage so if you've connected a battery to this you can monitor the charge state of your battery by um using that that fourth hidden um adc nice thank you for that answer i really really appreciate it is this james adams product like a lot of our products this is a james adams product and it just has that eerie james adams bauhaus um kind of attention to detail thing the more you look at it the more you'll love it yes i mean i'm falling in love with the pika right now and folks again are super excited and also have to give a shout out to rambling geek uk on twitch just subscribe so thank you so much for subscribing to our channel really appreciate it so mr c tell us what's up how let's do some coding cool i'm just um clicking away now on funny so you can see here i've got my funny ibe um and so i'm just going to bring in my modules that i need to make the code go so from machine import adc and pin so adc being analog digital converter and then pins being the pins on my pico so this is sort of bringing in my modules so for those watching at home it's kind of like i'm going to throw some instructions at the computer that require these modules if you don't go and bring them into my script you won't understand what i'm talking about so i'm telling you to do that i'm also going to bring in time because time is super useful for what we're about to do i want to be able to wait for a second before it does anything else so i need to bring in time and i'm going to set up my variable for the abc [Music] okay close that again and then i believe this is so this is uh picking pin 26 which is i think the one that you that you decided you were going to use and it's making an adc around that isn't it it's saying we are going to use this pin because you could use it as a digital input or a digital output but what you're saying here is we're going to take that pin it's one of the four special pins on the chip that can be used in this way and we're going to use it to get analog values oh evan could you explain what's an adc okay so an adc is an analog to digital converter so when we when i was talking about voltages which can vary right back at the start i was talking about digital logic right um ones and zeros and ones and zeros are expressed by either no voltage zero or lots of voltage um and that's all there is right there there aren't intermediate values the intermediate values are not meaningful the low ones tend to be zeros and the high ones tend to be ones but there's a sort of no man's land in the middle you're not supposed to go to um uh but in this analog world where i'm sweeping a pointer across a resistive track in order to generate a continuously varying voltage between zero and some number um that's an analog voltage um and so what i need is a but if i'm going to work on it in the program programs deal in numbers they deal in digital values and so what i need is i need to analog to digital converter which will take an analog voltage and turn it into a number um which i can then work on in the program that's what that's what's going on here neat thank you and i love this so much i think it's really neat and like we said at the beginning this is an intro to pico so it's really about helping folks who are brand new not just just to the pico but to digital making to really get a chance to understand what is happening here what's what's the code what are we actually doing so it's so exciting to have you here evan to explain this stuff and really like talk to us like we mentioned earlier just like for a 10 year old who's watching for someone like they can see this and be really excited and like wow i can try this at home how's it going mr c it's cool it's pretty much done now i think um so just looking through it i've added a few extra bits so i've changed i've made a variable for pwm and that's reading off of pin 15 and and so what i've got there is my i've got my pwn frequency at a thousand just here and so we can see underneath that my wild true loop is checking for duty so it sets duty to be the read on my um adc so what is it reading and then it sends that out through the pwm as that voltage goes to my light bulb so it's reading what is coming through the resistance and it's converting that and sending that out to my light bulb to change the brightness on the led as i change the potentiometer um and so what i need to do now is i'm just going to push the code to the pico so i just need to file and save my code to because nice and what's really great too i think you'll see here um especially if educators are watching sony's a really great tool to use like just for kids for educators who are new to coding you see at the bottom like the notes that are just like giving you the information you need especially if you have any errors in your code which is why i always will recommend it to folks it's automatically on like the raspberry pi as well it's one of the things we're proudest of um a raspberry pi is that we've been able to help uh ivar um who developed now i'm going to get the wrong baltic republic i think he's um but he's been working on the uh funny was his kind of personal kind of passion project um and what we've been able to do is we've been able to make contributions both to make it run better on the big raspberry pi and now to make it work better with the small raspberry pi he's an amazing guy well one of those really kind of driven people shout out yeah amazing guy okay so i've got mine hooked up now so this isn't connected to anything but a battery pack so i've got one of those battery packs okay so it's not running off my computer i'm not running the code on my laptop or anything else i've flashed it straight to the pico the pico has now stored it internally so you have nothing up your sleeve yeah yeah that's exactly no magic [Music] that's really that's there's a lot going on right in order to make that happen right you know there's there's so just some thinking so we said leds aren't my light bulbs now if you had someone gave you a light bulb and a potentiometer and a battery you could probably figure out how to you know arrange it to all as i turn it i get less voltage on the light bulb and the light bulb has you know just dimmer um that's not how leds work they're either on or off so let's think about how we would dim an led or what we give imagine you have an led which is only on for half the point and then it's off and it's on it's off in a lot of ways that's a half that's an led that's a half brightness right your eye is going to see because you have persistence of vision in your eye your eye is going to see that even though it's never half on it's either on or off um your eye will see it as being at 50 intensity if you have a an led which is on 90 of the time and off 10 of the time well that's going to seem like it's almost as bright as an led that's on all the time and an led which is only on one percent of the time and then off 1999 of the time that's going to seem almost almost off so you again just as we talked about the potentiometer kind of sweeping backwards and forwards and having some sort of um sort of analog position so the amount of time that you turn the led on for now obviously if you're if you do this um uh you turn it on suppose you want it to be on for a tenth of the time you want to be a 10th brightness and so you turn it on for a second and you turn it off for nine seconds that isn't going to look like it's because your eyes are better than that your eyes are horrible human eyes are terrible um but um it's not gonna look right but if you do it fast enough you know if like you know faster than cinema film plays back you know many times a second um then it's going to start to look good so if you look at your program um one of the first things you did after you made a pwm object that wrapped around that pin you set its frequency to a thousand which i'm going to guess um means that it's uh running at a kilohertz um so effectively a thousand times a second imagine a window of a thousandth of a second that's a millisecond right and what you're going to do is you're going to take a mill a second and chop that millisecond up into two periods one of which is the bit of time when it's on and the other is the bit of time it's off and then the next millisecond you'll do the same thing again keep doing that and that's what the program does it goes to the reads and duties and we call that the duty cycle the fraction of the millisecond that it's on for is the duty cycle so that's all the time 100 you recycle off all the time zero percentage cycle on half the time 50 duty cycle so what this thing is doing is it's going to the adc it's reading a value which is assigned to a variable called duty um and then it's taking that duty and it's poking straight into pwm so it's saying if the if the adc is a half is it 50 then you want a duty cycle of 50 if the adc was at 10 you want a duty cycle 10 percent and that's all it does you know all of that i mean you know thought about abstraction you know all the logic gates are whacking up and down in there you know we've got something like 12 million ish most of it in memory it's about 12 million transistors inside that raspberry pi pico like two square millimeters about 12 million transistors it's a thousandth of actually what's inside apple's youtube apple's youtube's got 12 billion transistors it's got 12 transistors still a lot by our standards um and all whacking up and down you know doing things and at the end what you get though is something quite understandable how far around the the the you know how far around the dial is the part okay let's make that fraction of every millisecond on running out of time but evan i want to ask like so we always talk about i think from like pie academy just to when we introduce folks it's like it starts with an led right and that's what this project is it's introducing the pico getting started with an led what are some like what are cool things that you imagine that people will be building with the raspberry pi pico in the future well i think the the home security thing is is already quite a long way along the list of things if you think about what i've seen people doing with it because we've had raspberry pi picos out with people for quite a while and so we've so some people who've had access to these for a longer have had a chance to do really cool stuff um one um a really amazing thing so graham sanderson's very old friend of mine uh out in austin in texas um he has done a bbc micro emulator so the weird thing about this but i talked 40 years ago right the bbc micro 399 pounds so that's 1200 pounds in today's money um thanks to the magic of inflation and he has been able to emulate the entire behavior of that twelve hundred pound what may be a twelve pound object on his bootcamp uh and you can plug it into one we'll plug it into a vga monitor and he can play elite or exile or any of those good old bbc micro games or he can use he can use it as a computer right you know we said this isn't a computer the very first thing i said was this isn't a computer this is a controller but in fact it's such a powerful controller that it can emulate a computer whatever i mean if you want to do word processing things got usb connection you plug a usb keyboard into it if you want to write do some word processing a thing you could do is to run graham's bbc micro emulator and run wordwise plus which was the word processor i used to use when i was a child to do my homework um on your raspberry pi pico amazing oh wow it was right it's it's just do you even think someone could imagine that 40 years ago thinking oh this is eventually gonna be on something for four dollars so i actually i can't do the conversion i don't know what that is 40 years ago like the cost of that right um it's a it well of course i mean famously um gordon moore did um so we have this thing called moore's law which is this idea that the gold more put forward is one of the founders of intel put forward in the late 60s early 70s saying that the number of transistors that you would talk about how many transistors you fit into a chip into a given area of silicon would seem to be doubling every year or two um and so you said you know he said that's incredible because doubling every year or two doesn't sound much but you know the story about the the knight who does some service to the king uh and the king says what do you want he says well okay give me a chess board i want one piece of rice on the first square and two on the second and four on the next and you know by the time you get several rows down the chess ball that's all the rise in the kingdom um the power of exponential doubling is enormous uh and so actually i mean probably it's it's kind of it would be a stretch to imagine that he saw it going all the way to today but we have lived our lives in in in like the night with the chessboard you know with endless just supplier processing power thrown at our heads um and that either turns into more processing remember that either turns into more processing power at a given price or it turns into less price for a given amount of processing that and kind of if you see what raspberry pi has done what we did when we launched what we were really saying was pc vendors have been using it the one way they've been saying it's a thousand bucks let's fill a thousand bucks and as much pressing as we can every year i really want raspberry pi our insight as was to say can we take the amount of processing power that we had 10 years ago how much would that cost now oh oh it costs 35 um and then of course what we've done then is the same thing the pc vendors do which is to take 35 and fill every year fill 35 dollars up so your raspberry pi 4 eight years after raspberry pi 1 is 40 times as powerful at 35 um that's why we do things like zero that's why we do things like pico to remind ourselves that we ought to be like pc vendors work right we don't want to we we always want to every now and then take a given amount of performance and use moore's law the other way to to drive the cost down and pico kind of looking back over that 40-year window to emulating bbc micro is kind of the the most insane logical conclusion of that thing wow okay i think just wow right and just to know where we come and where we're gonna go blend just it's just incredible and it's coming to an end this thing that we have lived in the that we've we've lived through is coming to an end you know it's coming to an end because we're running out of atoms you know when you look at that five nanometer chip the apple m1 um the the the structures of five nanometer structure is about 30 silicon atoms across you can't make it a 30th it's not going to work if it's one silicon atom across so finally you're approaching physical limits now there may be other things that take over from cnos um as the way that as the way that we build computer systems but that era of the steady drum beat of cmos processing is going down that's very nearly done and it's very nearly done because we're going to run out of atoms yeah this is the whole thing's statistical you know it's about oh this fraction of atoms have been replaced where silicon would be replaced by dopant that makes sense when there are a thousand atoms you can say all ten of them you know ten of them are probably on average about 10 of them with opens once you're down to 10 it's it's what was the other half was it under 10 it's like it's not you can't have a hundredth of the athens because there are only we could have a whole nother episode talking about adam and kicking out about where we're going to next but i we're out of time but this has been absolutely incredible thank you for coming on again with something at home last year when we were all like hey i wonder if this thing is going to be a thing right i really miss you guys i'm really looking forward to seeing you in person really miss you and thanks for wearing the coolest projects shirt folks stay tuned news about cools projects is coming up we're really excited we'll be sharing on digital making at home like keep an eye on this space go follow coolest projects on twitter and check out the website it's an awesome um program and maybe kids you can maybe create a project with uh the pico would be pretty cool to check out raspberry pi pico well then thank you so much it's been incredible hopefully we'll see you soon have a great rest of your day you bye guys later boss amazing so cool my mind's blown also evan we can all be together again and just to sit story time with evan and hear just like you hear so much because just to be able to reference in the knowledge that he has about computers from 40 years ago to now it's absolutely incredible and i think it's it's really a big part of why what we're able to do with raspberry pi and the raspberry pi foundation which is just so amazing absolutely the whole thing about exploiting moore's law to keep a price point but make the technology more powerful like that is one of my favorite things about what we do i think that's just so clever so incisive and a great way to get people started in computing right make it easy for them to access you know you don't need all the power in the world i think that's so cool and like being able to program a little board like pico for embedding using funny so easy like you saw today it means i can make so much cool stuff i'm going to try my hand at that security project i think yes right i have to let my dad know because he's always he's really into microcontrollers and that wasn't something that we had so now i can be like hey buddy check this out and it was also so great to see so many of you in the chat this week shout out to sarong um and we've got ali hello again alex um it's so great to see so many of you for all your great contributions to the discussion thank you to everyone we had folks from all over the world today and it was incredible to chat with you also thank you to our colleague mr mark scott who's been in the chat taking your technical questions if you didn't get your question answered there's also tons of really high quality technical documentation available at rpf dot io pico dash docs you can check out that link up here on the screen if you still have a question need a question answered check out the raspberry pi forum so that's all we have time for this week you can always get in touch with us though send us an email at dmah raspberrypi.org right there we'd love to hear from you if you have something you want to share with us you can also tweet a picture of it to us at raspberrypi underscore all right raspberry pi which you can tweet at raspberry pi underscore pie and we love getting the pictures that come in guys send them to us and don't forget to make sure to subscribe on youtube rpf.io sub or just hit the button on youtube and twitch it's literally right there and you'll be the first to know when we go live you'll get updates on all the other good content on the channel things about coolest projects astropyte all that stuff as i mentioned before this is our new channel okay so this focuses on kids and educational work we do and there's going to be a lot more educational content things for you to do at home coming up soon thank you all for being here for the raspberry pi foundation's digital making at home live stream again this week we'll be back at the same time next week once again with more digital making until then stay safe and healthy and we'll see you next time catch you later christina see you later bye
Info
Channel: Raspberry Pi Foundation
Views: 5,883
Rating: undefined out of 5
Keywords:
Id: Hd6ekoQRkaY
Channel Id: undefined
Length: 45min 40sec (2740 seconds)
Published: Wed Jan 27 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.