Introduction:
Raspberry Pi pico including what hardware, you should buy. How to install the operating system and then some initial steps once the operating system has been installed. Raspberry Pi pico has a little price. Second, it size is very small that can be easily lumps into a CPU display or television. It is also usages a normal mouse and keyboard. Raspberry Pi pico is a adept tiny devices that permits users of very age to discover adding.
What is Raspberry Pi pico?:
The raspberry pi name has been synonymous with many computers like the raspberry pi 4 and the raspberry pi zero but the pi pico isn't a standard computer like that at all so what is it that makes a pi pico different. Well it's a microcontroller, actually to be more specific this is the microcontroller the rp2040 a custom-made raspberry pi pico microcontroller chip and all the extra stuff around. It is to make the chip easier to program and use to fill you in a microcontroller is a chip that can be used to interface with other electronic devices like motors, lights or other sensors and then it can execute a specific set of tasks to control those electronic devices tinker nut couldn't. So, I hope you have understood by now what is raspberry pi pico? Now let's have a look at its pinout:
Raspberry Pi pico input/ output pins:
you do that with the other raspberry pi input output pins for the most parts but in order to use those pins you would have to wait for the pi to boot load an interface load the script and then finally you would be able to use it but that takes up several minutes and lots of unnecessary power for other things that you'll never need but with the micro controller you can load a program onto it and when it boots up it immediately starts executing that code no unnecessary programs or operating systems to go through and it can run on a pair of double-a batteries it sounds a lot like a product that's already been on the market for a while arduino. An arduino is a good comparison to what the pi pico is and if you're a microcontroller enthusiast there's also the expressive line of microcontrollers.
How a raspberry pi pico is not like an arduino?:
How a raspberry pi is not like an arduino and should not be confused with an arduino.
- Well, all these other microcontrollers that are already out there what makes the pi pico so special
- Its programmable input output pins and its ease of use with micro python
- But overall its selling point is its selling price clocking it at only four dollars.
- It's one of the cheapest ways to get into the world of microcontrollers so i could cover all the specs and what all the input output pins do but this being a beginner's guide.
How to use Raspberry Pi pico?:
How to use it a great feature about the raspberry pi pico is how easy it is to get started with it especially using micropython all you have to do is:
- Hold down the boot select button
- Plug it into your computer while holding down that button and even though using a raspberry pi computer to program
- Pico these instructions also work for windows mac and other linux devices
- It plugged in you can release the boot select button and the computer should recognize it.
- Open it up as a storage device in it you'll see a shortcut to the official pi pico.
How to download the Micro Python Bootloader for Pico?:
- It's much easier to learn so to do that we have to download the micro python bootloader
- It's a ufc file that you can just drag and drop onto your pico folder
- Once it's done downloading and then when the pico detects it it's going to reboot and then we can start programming
- This sucker the easiest software for programming the pi pico is ‘thonny’.
- a simple to use python editor so just make sure you've downloaded the newest version of it and when you start it up in the bottom right hand corner of the window you can select the pi pico as your device.
- Let's start by printing some simple text in the python editor and then click the run button where you want to save your file and you want to save it to your pico.
Storage of Raspberry pi pico:
The pico has two megabytes of storage to save your programs to so you can name it whatever you want but make sure it ends in the dot pi extension otherwise the pico is not going to know, how to read it once it's saved you'll see the output and the shell portion of the window if you were to hit the run button again you'll see the output again now you can start expanding your python code and write more complex examples and then save them and run them on your pico so the cool thing about this is the files are stored on the pico itself so if you were to take this off your computer and load it up on somebody else's computer all your files would still be there but the appeal of a microcontroller isn't just a store code on it it's being able to control other electronic devices.
Create a file (Programming):
Let's create a new file and to get started let's import a couple of libraries the machine library and the u-time library:
- Libraries are basically external files of code that if we want to use them in our program. We have to import them so with the machine library.
- We can create a new variable that tells us which pin the device we want to control is located in this case it's pin 25.
- The onboard led and we can set the pin mode to out meaning that we're only outputting a signal to it instead of receiving input next.
- We can create a while loop to run anything that we have inside the loop indefinitely and inside of the loop we're going to set our led variable to 1 which will send a power signal to it turning it on then with our u-time library.
- We can use the sleep function to pause the program for three seconds and after that we can set our led variable to zero turning it off.
Pause again for another three seconds and then since this is in our loop it will continue indefinitely. Now let's click run and save to our pico as blink dot pi and when the pico reboots the on board leds start blinking.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.