Skip to content

Commit

Permalink
Update turning off docs
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel committed Aug 4, 2024
1 parent 8e753bf commit d9865c0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
8 changes: 4 additions & 4 deletions docs/tildagon-apps/reference/badge-hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

<!-- prettier-ignore -->
| Method | Description | Arguments | Returns |
Expand All @@ -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)
```
Expand Down
20 changes: 15 additions & 5 deletions docs/using-the-badge/common-problems.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit d9865c0

Please sign in to comment.