Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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/Chained_button_schematic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/wiring/LEDs_schematic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/wiring/Separate_buttons_schematic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/controller-build/wiring.mdx
Copy link
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
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,20 @@ The Raspberry Pi Pico pinout can also be used on clone boards with the same form

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

# Buttons

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

You can either wire each button using two wires (one to the GPIO pin, the other to the ground):

![Buttons connected separately to GPIO and ground](../assets/wiring/Separate_buttons_schematic.png)

Or you can chain the groud wire from button to button, e. g. by crimping two wires at once to a FASTON terminal or by soldering two wires to a button pin. The other contact of each button must be connected to a separate GPIO pin:

![Buttons connected using chained ground wire](../assets/wiring/Chained_button_schematic.png)

# PWM LEDs

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 an online calculator to compute its value if unsure. The maximum safe current is cca 20mA.

![How to conect LEDs and buttons to the GPIO](../assets/wiring/LEDs_schematic.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