Skip to content

Commit 4c7a5ea

Browse files
authored
Merge pull request #2091 from adafruit/midi_makers_display
Updating display MIDI messages example
2 parents a981aeb + 622901a commit 4c7a5ea

File tree

1 file changed

+8
-2
lines changed
  • MIDI_for_Makers/Receive_and_Display_MIDI_Messages

1 file changed

+8
-2
lines changed

MIDI_for_Makers/Receive_and_Display_MIDI_Messages/code.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@
1919
oled_reset = board.D1
2020

2121
# I2C setup for display
22+
23+
# STEMMA I2C setup pre-CP 7.2
2224
i2c = busio.I2C(board.SCL1, board.SDA1)
25+
26+
# STEMMA I2C setup for CP 7.2+
27+
# i2c = board.STEMMA_I2C()
28+
2329
display_bus = displayio.I2CDisplay(i2c, device_address=0x3D, reset=oled_reset)
2430

2531
# midi setup
@@ -32,7 +38,7 @@
3238

3339
# display width and height setup
3440
WIDTH = 128
35-
HEIGHT = 32
41+
HEIGHT = 64
3642
BORDER = 5
3743

3844
# display setup
@@ -44,7 +50,7 @@
4450
# text area setup
4551
text = "MIDI Messages"
4652
text_area = label.Label(
47-
terminalio.FONT, text=text, color=0xFFFFFF, x=28, y=HEIGHT // 2+1)
53+
terminalio.FONT, text=text, color=0xFFFFFF, x=30, y=HEIGHT // 2+1)
4854
splash.append(text_area)
4955

5056
while True:

0 commit comments

Comments
 (0)