diff --git a/README.md b/README.md index acec3224..a8e9883d 100644 --- a/README.md +++ b/README.md @@ -1 +1,29 @@ -# pimoroni-pico \ No newline at end of file +# Pimoroni Pico Libraries and Examples + +Welcome to the brave new world of Pico! This repository contains the C/C++ and MicroPython libraries for our range of Raspberry Pi Pico addons. + +First of all you need to decide if your project is going to be done in MicroPython or using C/C++ with the Pico SDK. We have instructions for both here: + +- **MicroPython**: The easiest way to get start, setup is a breeze! [Click here to view instructions for MicroPython](setting-up-micropython.md) +- **C/C++**: For more advanced users that want to unlease the full power of Pico! [Click here to view instructions for C/C++](setting-up-the-pico-sdk.md) + +# Software support for our Pico range + +It's very early days for Pico and we've been working our little socks off to get everything ready for launch. + +Most of our Pico addons have support for both C/C++ and MicroPython but we're still catching up a little bit in places. + +The table below shows the current state of compatibly and some notes to set expectations: + +|Product|C/C++ Library|MicroPython Library|Notes +|---|---|---|--- +|[Pico Explorer Base](https://shop.pimoroni.com/products/pico-explorer-base)|Yes|Yes| +|[Pico RGB Keypad](https://shop.pimoroni.com/products/pico-rgb-keypad-base)|Yes|Yes| +|[Pico Unicorn Pack](https://shop.pimoroni.com/products/pico-unicorn-pack)|Yes|Known Bug|There is a known issue we're working on +|[Pico Audio Pack](https://shop.pimoroni.com/products/pico-audio-pack)|Yes|No|Limited Support for MicroPython planned +|[Pico Scroll Pack](https://shop.pimoroni.com/products/pico-scroll-pack)|Yes|Yes| +|[Pico Display Pack](https://shop.pimoroni.com/products/pico-display-pack)|Yes|Yes| + +We will keep this information updated as things develop. + +**Note:** It's very early days for Raspberry Pi Pico and it's likely that our libraries will undergo quite a lot of changes over the next couple of weeks as we take in feedback and expand the functionality. \ No newline at end of file diff --git a/setting-up-micropython.md b/setting-up-micropython.md new file mode 100644 index 00000000..7410e051 --- /dev/null +++ b/setting-up-micropython.md @@ -0,0 +1,23 @@ +# Setting up MicroPython + +If you just want to use MicroPython then setup is a breeze as we've already built the firmware for you and you can simply drag it onto your Pico to get started. + +If you want to use our products with your Raspberry Pi Pico then you must use our pre-built firmware as it contains all of the drivers needed. + +To setup your Raspberry Pi Pico with our MicroPython firmware follow these steps: + +**Step 1.** Disconnect the USB cable from your Raspberry Pi Pico. + +**Step 2.** Press and hold the "BOOTSEL" switch on top of the Raspberry Pi Pico. + +**Step 3.** Plug the USB cable back into your Raspberry Pi Pico (making sure to keep the "BOOTSEL" button pressed while you do it!). + +This should put your Raspberry Pi Pico into firmware update mode. It will appear as a new disk drive on your computer with the name **RPI-RP2**. + +**Step 4.** Download our custom MicroPython firmware image. [Click here to download]() + +**Step 5.** Copy the downloaded firmware image onto the **RPI-RP** drive. + +The firmware will now upload to your Raspberry Pi Pico and when it has finished uploading (which takes around five seconds) the Pico will restart itself. + +Hurrah! You're setup and good to go! \ No newline at end of file diff --git a/setting-up-the-pico-sdk.md b/setting-up-the-pico-sdk.md new file mode 100644 index 00000000..3ea08869 --- /dev/null +++ b/setting-up-the-pico-sdk.md @@ -0,0 +1,61 @@ +# Setting up the Pico SDK + +If you want to make the installation as simple as possible just follow the steps below (you can simply cut and paste these commands into your terminal): + +**Step 1.** Create a new directory in your home directory to keep everything tidily in one place: + +```bash +cd ~ +mkdir pico +cd pico +``` + +**Step 2.** Install the Pico SDK and examples: + +```bash +git clone -b master https://github.com/raspberrypi/pico-sdk.git +cd pico-sdk +git submodule update --init +cd .. +git clone -b master https://github.com/raspberrypi/pico-examples.git +``` + +**Step 3.** Install the MicroPython port (optional): + +```bash +git clone -b pico https://github.com/raspberrypi/micropython.git +cd micropython +git submodule update --init -- lib/pico-sdk +cd lib/pico-sdk +git submodule update --init +cd ../../.. +``` + +**Step 4.** Install the toolchain needed to build Pico projects. + +```bash +sudo apt update +sudo apt install cmake gcc-arm-none-eabi build-essential +``` + +**Step 5.** Install the Pimoroni Pico libraries: + +```bash +git clone https://github.com/pimoroni/pimoroni-pico.git +cd pimoroni-pico +mkdir build +``` + +And you're done. Everything is installed and ready to go. + +A good place to start is to build our examples which will prove that everything is setup correctly. Our project is setup to mimic the approach that Raspberry Pi have taken so if you're familiar with building their examples this should be a familiar process. + +``` +cd build +cmake .. +make +``` + +When the `make` command has completed you'll see that a number of new files and directories have appeared in your `build` directory. For the purpose of building our examples the one that matters is the `examples` directory. + +Inside `examples` will be one directory per product, each of which contain at least one `.uf2` file that can be flashed directly onto your Pico.