Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/assets/wiring/Buttons_LEDs_Schematics.png

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these be split up into two separate file? One for Player LED one for a button?

Player LED looks fine,

For the button example can we change that to include an example of one button and multiple buttons, adding a note that the grounds can be chained.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/controller-build/wiring.mdx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer that we breakout the LED and buttons section if we are going to add basic sections for them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,10 @@ The Raspberry Pi Pico pinout can also be used on clone boards with the same form

![Adafruit KB2040 Pinout](../assets/wiring/SeeedXIAORP2040_Pinout.png)

# LEDs and buttons

GP2040-CE cofigures the input GPIO pins to be pulled up, expecting the button to short the pin to the ground when pressed.

The PWM player LED pins are configured similarly: the pin is shorted to the ground when active and pulled up otherwise. This means the LED anodes must be connected to the +3.3V output of the microcontroller and each cathode to its GPIO pin, in an arrangement called common anode. A current-limiting resistor must be inserted into the circuit to protect the GPIO pins; use a online calculator to compute its minimum value if unsure. The maximum safe current is cca 20mA.

![How to conect LEDs and buttons to the GPIO](../assets/wiring/Buttons_LEDs_Schematics.png)
4 changes: 4 additions & 0 deletions docs/web-configurator/menu-pages/02-gpio-pin-mapping.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,7 @@ At this time, profiles are limited to changing GPIO pin assignment and cannot be
- Keyboard Host Button-to-Key mapping

:::

## Custom builds

How to wire buttons to GPIO pins is described in the [Wiring section](../../controller-build/wiring.mdx).
6 changes: 6 additions & 0 deletions docs/web-configurator/menu-pages/05-led-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ Available selections for `Player LED Type` are `None`, `PWM` or `RGB`.

### PWM Player LEDs

:::note

How to wire LEDs to GPIO pins is described in the [Wiring section](../../controller-build/wiring.mdx).

:::

![GP2040-CE Configurator - PWM Player LEDs](../../assets/images/gpc-pled-pwm.png)

- `PLED #[1-4] Pin` - The GPIO pin the standard LED is connected to.
Expand Down