Should the examples default to using stdio USB?

Open
#321 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
c, cmake

Research direction

Start by locating how the examples configure the PICO_STDIO_UART and PICO_STDIO_USB CMake options, then compare that configuration with the examples that need visible output. The issue does not name files or tests, and completion depends on deciding between a USB default and a clearer user choice.

Written by the indexing model from the issue text.

Description

enhancement

Some of the examples only really "work" if you can see the output. But by default we enabled UART which means you have to own a USB adapter.

Maybe we should default to using USB, or have some clearer explicit way for the user to specify their choice? I have a load of aliases to make the switch for me

alias cmaked="cmake -DCMAKE_BUILD_TYPE=Debug"
alias cmakeu="cmake -DPICO_STDIO_UART=0 -DPICO_STDIO_USB=1"
alias cmakedu="cmaked -DPICO_STDIO_UART=0 -DPICO_STDIO_USB=1"
alias cmaken="cmake -G Ninja"
alias cmakedn="cmaken -DCMAKE_BUILD_TYPE=Debug"
alias cmakeun="cmaken -DPICO_STDIO_UART=0 -DPICO_STDIO_USB=1"
alias cmakedun="cmakedn -DPICO_STDIO_UART=0 -DPICO_STDIO_USB=1"

Dominant language
C
Stars
3.9k
Forks
1k
Avg merge
1d 16h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/pico-examples

All issues in raspberrypi/pico-examples

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.