Sets the adjustable output once at boot, then idles. SPI1: SCK GPIO10,
MOSI GPIO11, CS GPIO13. MCP41100 command: 0x11 0x0A.
Wiper code 10 gives roughly 4.8–4.9 V with nominal components. Measure the
output and adjust POWER_5V_WIPER_CODE in src/config.h if needed.
Higher codes lower the voltage. There is no ADC feedback; exact 5 V may
require a resistor change. The setting is reapplied after each power cycle.
cmake -S . -B build -DPICO_SDK_PATH="$HOME/.pico-sdk/sdk/2.2.0" \
-DPICO_TOOLCHAIN_PATH="$HOME/.pico-sdk/toolchain/14_2_Rel1"
cmake --build build -jDefault board: pimoroni_pico_plus2_rp2350. For RP2040, use
-DPICO_BOARD=pico in a separate build directory.
Open module-power as the workspace folder with the Raspberry Pi Pico and
CMake Tools extensions installed. Run CMake: Configure once, then use the
Pico extension's Run Project action (or Tasks: Run Task → Run Project).
The task builds POWER_MODULE_PICO, flashes it over USB with picotool load -fx, and starts it. Compile Project only builds.
Use Raspberry Pi Pico: Run Project, not CMake: Run Without Debugging.
The CMake run command executes the ARM ELF on the host computer and fails with
Exec format error. The workspace hides the CMake launch/debug buttons and
the C/C++ editor debug shortcut to avoid this confusion. After updating these
settings, run Developer: Reload Window if the old buttons are still shown.
The firmware enables the SDK USB reset interface so subsequent flashes can
reboot the running board automatically. If the board still has the older
USB-disabled firmware, hold BOOTSEL while connecting USB for the first flash.
Alternatively, copy build/POWER_MODULE_PICO.uf2 to its BOOTSEL drive once.
The task and CMake configuration point to the installed 2.2.0-a4 picotool
tools. If changing versions, update .vscode/tasks.json,
.vscode/settings.json, and picotoolVersion in CMakeLists.txt together.