Skip to content
Open
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
4 changes: 2 additions & 2 deletions docs/hexpansions/writing-hexpansion-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ Below is an example of how you find which port your hexpansion is plugged in to
for port in range(1, 7):
print(f"Searching for hexpansion on port: {port}")
i2c = I2C(port)
addr,addr_len = detect_eeprom_addr(i2c) # Firmware version 1.8 and upwards only!
addr, addr_len = detect_eeprom_addr(i2c) # Firmware version 1.8 and upwards only!

if addr is None:
continue
else:
print("Found EEPROM at addr " + hex(addr))

header = read_hexpansion_header(i2c, addr)
header = read_hexpansion_header(i2c, addr, addr_len=addr_len)
if header is None:
continue
else:
Expand Down
13 changes: 7 additions & 6 deletions docs/tildagon-apps/backgrounds.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ from app_components.background import Background as bg
then call the update and draw functions from the same functions in your app:

```python
def draw(self, ctx):
bg.draw(ctx)
# add you code
def draw(self, ctx):
bg.draw(ctx)
# add you code

def update(self, delta):
bg.update(delta)
# add you code

def update(self, delta):
bg.update(delta)
# add you code
```
4 changes: 2 additions & 2 deletions docs/tildagon-apps/examples/detect-hexpansion.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ class ExampleApp(app.App):
for port in range(1, 7):
print(f"Searching for hexpansion on port: {port}")
i2c = I2C(port)
addr = detect_eeprom_addr(i2c)
addr, addr_len = detect_eeprom_addr(i2c)

if addr is None:
continue
else:
print("Found EEPROM at addr " + hex(addr))

header = read_hexpansion_header(i2c, addr)
header = read_hexpansion_header(i2c, addr, addr_len=addr_len)
if header is None:
continue
else:
Expand Down
4 changes: 2 additions & 2 deletions docs/tildagon-apps/reference/badge-hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -698,14 +698,14 @@ bus = I2C(1)
for port in range(1, 7):
print(f"Searching for hexpansion on port: {port}")
i2c = I2C(port)
addr = detect_eeprom_addr(i2c)
addr, addr_len = detect_eeprom_addr(i2c)

if addr is None:
continue
else:
print("Found EEPROM at addr " + hex(addr))

header = read_hexpansion_header(i2c, addr)
header = read_hexpansion_header(i2c, addr, addr_len=addr_len)
if header is None:
continue
else:
Expand Down