diff --git a/docs/tildagon-apps/reference/badge-hardware.md b/docs/tildagon-apps/reference/badge-hardware.md index df9b343..0618907 100644 --- a/docs/tildagon-apps/reference/badge-hardware.md +++ b/docs/tildagon-apps/reference/badge-hardware.md @@ -337,9 +337,9 @@ A more elaborate example is this [breadboard tester app](https://github.com/npen ### Methods -GPIO pins support the standard [`machine.Pin` methods](https://docs.micropython.org/en/latest/library/machine.Pin.html). These are refered to as high speed pins as they are connected directly to the ESP32. +GPIO pins support the standard [`machine.Pin` methods](https://docs.micropython.org/en/latest/library/machine.Pin.html). These are referred to as high speed pins as they are connected directly to the ESP32. -[eGPIO pins](https://github.com/emfcamp/badge-2024-software/blob/main/modules/tildagon/pins.py) are refered to as low speed pins as they are connected to a port expander by I2C and support the following methods: +[eGPIO pins](https://github.com/emfcamp/badge-2024-software/blob/main/modules/tildagon/pins.py) are referred to as low speed pins as they are connected to a port expander by I2C and support the following methods: | Method | Description | Arguments | Returns | @@ -362,11 +362,11 @@ To use the `Pin`s: # GPIO pins self.pins["hs_1"] = self.hexpansion_config.pin[0] - + # All pins start in inputs mode. Initialize them as follows: self.pins["hs_1"].init(self.pins["hs_1"].OUT) self.pins["ls_1"].init(self.pins["ls_1"].OUT) - + # Only LS pins support the PWM function directly. self.pins["ls_2"].init(self.pins["ls_2"].PWM) ``` diff --git a/docs/using-the-badge/common-problems.md b/docs/using-the-badge/common-problems.md index 4d5be3b..dc77d26 100644 --- a/docs/using-the-badge/common-problems.md +++ b/docs/using-the-badge/common-problems.md @@ -31,12 +31,22 @@ See [Replacing badge components](./replacing-parts.md). [Install `mpremote`](https://docs.micropython.org/en/latest/reference/mpremote.html) and follow the steps in [Debug your app on your badge](../tildagon-apps/run-on-badge.md#debug-your-app-on-your-badge) to get a shell on your badge and then run the following commands: -```sh -import machine -import bq25895 +=== "v1.8.0 and above" -bq25895.bq25895(machine.I2C(7)).disconnect_battery() -``` + ```sh + import power + + power.Off() + ``` + +=== "below v1.8.0" + + ```sh + import machine + import bq25895 + + bq25895.bq25895(machine.I2C(7)).disconnect_battery() + ``` After running the command, disconnect your badge from the USB cable and your badge will be turned off.