This is a template for a Pico W project. It includes a basic project structure and a simple example of a Pico W application in C using pico-sdk and pico-extras. Feel free to use it if CMake is is challenging for you or you just want to get started quickly.
To use this template click "Use this template" and create a new repository or open the template in a codespaces or use this template here.
After the repository is recreated, please modify repo settings in order to GitHub Pages docs deploy workflow succeed. Select GitHub Actions as a source for build and deployment.
Important
Even if your repository is private, deployed docs will be available publicly.
CodeQL might not work for private repositories. If you want to use it, you need to enable it in the repository settings, else remove the workflow.
It might be necessary to install additional dependencies to build the project. The following commands install the required dependencies on Ubuntu:
sudo apt-get install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential ninja-build
This project uses git submodules to include the Pico SDK and Pico Extras. To clone the repository with submodules use the following command:
git clone --recurse-submodules https://github.com/{your_username}/{your_repo}.git
If you have already cloned the repository without submodules you can initialize them using the following commands:
git submodule update --init
If any issues occur during the build, you may wanted to update the submodules inside pico-sdk
:
cd lib/pico-sdk
git submodule update --init
Please create a wifi_credentials.h
file inside include
directory. The file should contain the following lines:
#ifndef _WIFI_CREDENTIALS_H
#define _WIFI_CREDENTIALS_H
#define WIFI_SSID "wifi_ssid"
#define WIFI_PASSWORD "wifi_password"
#endif
To build the project, run the following commands:
mkdir build
cd build
cmake -G Ninja ..
ninja
This will produce .uf2
file located in build/src
directory. You can flash it to your Pico W device using the USB mass storage mode. Instruction
This project is licensed under the MIT License - see the LICENSE file for details.