Skip to content

Commit

Permalink
Minor tweaks to the example in the Display extension doc (#926)
Browse files Browse the repository at this point in the history
Minor tweaks to the Display extension doc
  • Loading branch information
brianmarco authored Jan 4, 2024
1 parent eef8bc6 commit d821f36
Showing 1 changed file with 9 additions and 5 deletions.
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

0 comments on commit d821f36

Please sign in to comment.