Skip to content

Commit dbf3aa6

Browse files
committed
Fix RGB mapping, add to docs
1 parent 2d4b1d6 commit dbf3aa6

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

examples/interstate75/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@ Follow Pimoroni's guide: https://learn.pimoroni.com/article/getting-started-with
1010

1111
(be sure to utilise the "... with filesystem" firmware)
1212

13-
Once connected to the device:
14-
- Copy the `flight_display.py` file onto the device
13+
This example was tested on Interstate 75 firmware version `0.0.5`.
14+
15+
Once connected to the I75 device:
16+
- Copy the `flight_display.py` file onto the device (optionally rename it to `main.py` to run on boot)
1517
- Set `API_URL` in `flight_display.py`
16-
- Configure the location by editing `LATITUDE`, `LONGITUDE` and `RADIUS` in `flight_display.py`
18+
- Set the config options towards the top of `flight_display.py`, including the location `LATITUDE`, `LONGITUDE` and `RADIUS`
1719
- Optionally adjust the quiet time settings in `flight_display.py` (show nothing on the display between these times)
1820
- Be sure to set `UTC_OFFSET` to correctly calculate quiet time based on your timezone
21+
- Note the line `color_order=Interstate75.COLOR_ORDER_GRB` in `flight_display.py` - this was required for the specific panel tested, but you may need to change it back to `COLOR_ORDER_RGB` or another value depending on your panel
1922
- Create a `secrets.py` file containing:
2023

2124
```python

examples/interstate75/flight_display.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
import urequests
77
from interstate75 import Interstate75, DISPLAY_INTERSTATE75_64X32
88

9-
i75 = Interstate75(display=DISPLAY_INTERSTATE75_64X32)
9+
# the specific panel this was tested on had "RGB" values flipped to "GRB"; you might need to swap back to `COLOR_ORDER_RGB` (or another value)
10+
i75 = Interstate75(display=DISPLAY_INTERSTATE75_64X32, color_order=Interstate75.COLOR_ORDER_GRB)
1011
display = i75.display
1112

1213
WIDTH = i75.width # 64 pixels
@@ -31,15 +32,15 @@
3132
QUIET_END_HOUR = 7
3233
QUIET_END_MINUTE = 0
3334

34-
# colors (RGB values are weirdly off, it's more like "GBR" - bug in I75 v0.0.5?)
35+
# colours, see `color_order=Interstate75.COLOR_ORDER_GRB` above (specifically `COLOR_ORDER_GRB`)
3536
BLACK = display.create_pen(0, 0, 0)
3637
WHITE = display.create_pen(*((255, 255, 255) if BRIGHT_MODE else (200, 200, 200)))
37-
RED = display.create_pen(*((64, 64, 255) if BRIGHT_MODE else (32, 32, 128)))
38-
GREEN = display.create_pen(*((255, 64, 64) if BRIGHT_MODE else (128, 32, 32)))
39-
BLUE = display.create_pen(*((64, 255, 64) if BRIGHT_MODE else (32, 128, 32)))
40-
CYAN = display.create_pen(*((255, 255, 64) if BRIGHT_MODE else (128, 128, 32)))
41-
MAGENTA = display.create_pen(*((64, 255, 255) if BRIGHT_MODE else (32, 128, 128)))
42-
YELLOW = display.create_pen(*((255, 64, 255) if BRIGHT_MODE else (128, 32, 128)))
38+
BLUE = display.create_pen(*((64, 64, 255) if BRIGHT_MODE else (32, 32, 128)))
39+
RED = display.create_pen(*((255, 64, 64) if BRIGHT_MODE else (128, 32, 32)))
40+
GREEN = display.create_pen(*((64, 255, 64) if BRIGHT_MODE else (32, 128, 32)))
41+
CYAN = display.create_pen(*((0, 255, 255) if BRIGHT_MODE else (0, 128, 128)))
42+
MAGENTA = display.create_pen(*((255, 0, 255) if BRIGHT_MODE else (128, 0, 128)))
43+
YELLOW = display.create_pen(*((255, 255, 0) if BRIGHT_MODE else (128, 128, 0)))
4344

4445
# font
4546
display.set_font("bitmap8")

0 commit comments

Comments
 (0)