diff --git a/docs/assets/wiring/Chained_button_schematic.png b/docs/assets/wiring/Chained_button_schematic.png new file mode 100644 index 0000000..3e0c8f8 Binary files /dev/null and b/docs/assets/wiring/Chained_button_schematic.png differ diff --git a/docs/assets/wiring/LEDs_schematic.png b/docs/assets/wiring/LEDs_schematic.png new file mode 100644 index 0000000..9e02b12 Binary files /dev/null and b/docs/assets/wiring/LEDs_schematic.png differ diff --git a/docs/assets/wiring/Separate_buttons_schematic.png b/docs/assets/wiring/Separate_buttons_schematic.png new file mode 100644 index 0000000..c6e1a99 Binary files /dev/null and b/docs/assets/wiring/Separate_buttons_schematic.png differ diff --git a/docs/controller-build/wiring.mdx b/docs/controller-build/wiring.mdx index 0664a14..69b2db8 100644 --- a/docs/controller-build/wiring.mdx +++ b/docs/controller-build/wiring.mdx @@ -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) diff --git a/docs/web-configurator/menu-pages/02-gpio-pin-mapping.mdx b/docs/web-configurator/menu-pages/02-gpio-pin-mapping.mdx index dd6c3f4..abdbc55 100644 --- a/docs/web-configurator/menu-pages/02-gpio-pin-mapping.mdx +++ b/docs/web-configurator/menu-pages/02-gpio-pin-mapping.mdx @@ -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). \ No newline at end of file diff --git a/docs/web-configurator/menu-pages/05-led-configuration.mdx b/docs/web-configurator/menu-pages/05-led-configuration.mdx index 96d5a44..44216d0 100644 --- a/docs/web-configurator/menu-pages/05-led-configuration.mdx +++ b/docs/web-configurator/menu-pages/05-led-configuration.mdx @@ -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.