4th year project, redesigning and making the device programming coursework for the 2nd years
These are examples to demonstrate different capabilities of the device.
First ensure you have the pico-sdk correctly installed on your computer, the cmake does not install this for you. To do this
git clone https://github.com/raspberrypi/pico-sdk
cd pico-sdk
git submodule update --initThen ensure the enviroment variable is set for your device
nano ~/.bashrcand add the line ensure the file location ends with /pico-sdk
export PICO_SDK_PATH=path/to/folder/pico-sdk
Then ensure the enviroment variable is set for your device
nano ~/.zshrcand add the line ensure the file location ends with /pico-sdk
export PICO_SDK_PATH="path/to/folder/pico-sdk"
ensure the file location ends with /pico-sdk
setx PICO_SDK_PATH "path/to/folder/pico-sdk"To build all C++ / C examples navigate into the C++ folder
cd pico-examples/C++
cmake -B build
cmake --build buildThis will build each example as a separate project in the build folder, copy the desired example onto the rp2040 board to use.
To build a specific project navigate into the project folder and build normally
cmake -B build
cmake --build buildFor faster compilation you can modify the second line to
cmake --build build --parallel 16changing the number to the number of threads you have
upload the required micro python uf2 for your rp2040 device, these can be found at micropython.org. Then run whichever example you desire on the board as you normally would.