Skip to content

Reorganise examples: add component demo files and project-based examples #147

@pjbRPF

Description

@pjbRPF

Is your feature request related to a problem? Please describe.
Currently, examples mix simple API demonstrations with standalone project examples. This creates inconsistency: new users can't easily distinguish between "how do I use this component?" (API learning) and "what can I build with this?" (inspiration/real-world context). Learning pathways are unclear, and examples vary in scope and audience.

Describe the solution you'd like
Reorganise examples into a two-tier structure:

  1. [component]_demo.py: Concise, focused files showing core API features and common patterns (e.g., led_brightness.py, button_function.py). These serve as quick references and sanity checks.

  2. Project-based examples 2+ per component, using descriptive names (e.g., stepper_analog_clock.py, stepper_automatic_blinds.py, servo_drawbot.py). These demonstrate real-world composition and inspire creators.
    Include consistent docstrings (wiring, hardware requirements, goal) and group by component in docs indexing.

Describe alternatives you've considered

  • Keep current mixed structure with a visual guide (didn't choose: adds documentation burden without structural clarity).
  • Merge all examples into single comprehensive files (didn't choose: too verbose for quick learning).

Additional context
Existing strong examples: stepper_automatic_blinds.py, stepper_analog_clock.py serve as templates for engaging, practical examples. This mirrors common patterns in other embedded libraries (Arduino, CircuitPython) and improves discoverability and on-ramp for beginners.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationhelp wantedExtra attention is needed

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions