|  | 
| 29 | 29 | WIDTH = 128 | 
| 30 | 30 | HEIGHT = 128 | 
| 31 | 31 | #  display setup | 
| 32 |  | -display = adafruit_ssd1327.SSD1327(display_bus, width=WIDTH, height=HEIGHT, brightness = 0.01) | 
|  | 32 | +display = adafruit_ssd1327.SSD1327(display_bus, width=WIDTH, height=HEIGHT, brightness=0.01) | 
| 33 | 33 | 
 | 
| 34 | 34 | #  main display group, shows default GUI menu | 
| 35 |  | -splash = displayio.Group(max_size=60) | 
|  | 35 | +splash = displayio.Group() | 
| 36 | 36 | #  group for circle icons | 
| 37 |  | -circle_group = displayio.Group(max_size=30) | 
|  | 37 | +circle_group = displayio.Group() | 
| 38 | 38 | #  group for text labels on circles | 
| 39 |  | -text_group = displayio.Group(max_size=30) | 
|  | 39 | +text_group = displayio.Group() | 
| 40 | 40 | 
 | 
| 41 | 41 | #  list of circle positions | 
| 42 | 42 | spots = ( | 
|  | 
| 61 | 61 | #  creating the circles & pulling in positions from spots | 
| 62 | 62 | for spot in spots: | 
| 63 | 63 |     circle = Circle(x0=spot[0], y0=spot[1], r=14, fill=0x888888) | 
| 64 |  | -	#  adding circles to their display group | 
|  | 64 | +    # adding circles to their display group | 
| 65 | 65 |     circle_group.append(circle) | 
| 66 | 66 | #  square to show position on menu | 
| 67 |  | -rect = Rect(0, 0, 33, 33, fill=None, outline=0x00FF00, stroke = 3) | 
|  | 67 | +rect = Rect(0, 0, 33, 33, fill=None, outline=0x00FF00, stroke=3) | 
| 68 | 68 | 
 | 
| 69 | 69 | splash.append(circle_group) | 
| 70 | 70 | splash.append(rect) | 
|  | 
| 99 | 99 | splash.append(text_group) | 
| 100 | 100 | 
 | 
| 101 | 101 | #  secondary display group, shows large circle when button is selected | 
| 102 |  | -big_splash = displayio.Group(max_size=60) | 
|  | 102 | +big_splash = displayio.Group() | 
| 103 | 103 | #  large circle to fill display | 
| 104 | 104 | big_circle = Circle(x0=64, y0=64, r=62, fill=0x888888) | 
| 105 | 105 | big_splash.append(big_circle) | 
|  | 
| 201 | 201 | down_scroll = 0 | 
| 202 | 202 | left_scroll = 0 | 
| 203 | 203 | right_scroll = 0 | 
| 204 |  | -switch_coordinates = [(0, 0), (1, 0), (2, 0), (3, 0), (0, 1), (1, 1), (2, 1), (3, 1), (0, 2), | 
| 205 |  | -            (1, 2), (2, 2), (3, 2), (0, 3), (1, 3), (2, 3), (3, 3)] | 
|  | 204 | +switch_coordinates = [(0, 0), (1, 0), (2, 0), (3, 0), | 
|  | 205 | +                      (0, 1), (1, 1), (2, 1), (3, 1), | 
|  | 206 | +                      (0, 2), (1, 2), (2, 2), (3, 2), | 
|  | 207 | +                      (0, 3), (1, 3), (2, 3), (3, 3)] | 
| 206 | 208 | 
 | 
| 207 | 209 | #  array of default MIDI notes | 
| 208 | 210 | midi_notes = [60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75] | 
|  | 
0 commit comments