Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor tweaks to the example in the Display extension doc #926

Merged
merged 2 commits into from
Jan 4, 2024
Merged
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
14 changes: 9 additions & 5 deletions docs/en/Display.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,14 @@ layers = Layers()
keyboard.modules.append(layers)

i2c_bus = busio.I2C(board.GP21, board.GP20)
display_driver = SSD1306(i2c=i2c_bus)
display_driver = SSD1306(
i2c=i2c_bus,
# Optional device_addres argument. Default is 0x3C.
# device_address=0x3C,
)

display = Display(
display=display_driver
display=display_driver,
entries=[
TextEntry(text='Layer: ', x=0, y=32, y_anchor='B'),
TextEntry(text='BASE', x=40, y=32, y_anchor='B', layer=0),
Expand All @@ -211,11 +215,11 @@ display = Display(
TextEntry(text='1', x=12, y=4, inverted=True, layer=1),
TextEntry(text='2', x=24, y=4, inverted=True, layer=2),
],
device_address=0x3C,
width=128,
# Optional width argument. Default is 128.
# width=128,
height=64,
dim_time=10,
dim_target=0.1,
dim_target=0.2,
off_time=1200,
brightness=1,
)
Expand Down
Loading