From 53f5f23e6643580f538bf6b8170b4d546a23d4e2 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Thu, 21 Mar 2024 17:41:49 -0500 Subject: [PATCH 1/5] bitmaptools.blit fix --- CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py b/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py index 31423f6e8..d0061e03f 100644 --- a/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py +++ b/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py @@ -193,7 +193,7 @@ def take_stop_motion_gif(n_frames=10, replay_frame_time=.3): writer.add_frame(frame, replay_frame_time) for i in range(1, n_frames): print(f"{i}/{n_frames}") - old_frame.blit(0, 0, frame, x1=0, y1=0, x2=cam.width, y2=cam.height) + bitmaptools.blit(old_frame, frame, 0, 0, x1=0, y1=0, x2=cam.width, y2=cam.height) frame = wait_record_pressed_update_display(False, cam) writer.add_frame(frame, replay_frame_time) print("done") From 74eaa1b1d2c7ef2ffcefa8c6c4dc6a44e1ebd52c Mon Sep 17 00:00:00 2001 From: foamyguy Date: Thu, 21 Mar 2024 18:35:43 -0500 Subject: [PATCH 2/5] i2cdisplaybus change --- 4x4_MIDI_Messenger/code.py | 3 ++- AHT20_OLED/code.py | 3 ++- CAN_Bus_BFF/CircuitPython/can_bus_bff_receiver.py | 3 ++- CircuitPython_GetSuperpower_PicoW_OpenAI/code.py | 3 ++- CircuitPython_KeyPad_Calculator/code/code.py | 3 ++- CircuitPython_OLED_Watch/code.py | 3 ++- CircuitPython_Sip_and_Puff/puff_detector.py | 3 ++- FunHouse_IOT_Hub/battery_peripheral/code.py | 3 ++- I_Voted_Pin/code.py | 3 ++- MIDI_Melody_Maker/code.py | 3 ++- MIDI_for_Makers/Receive_and_Display_MIDI_Messages/code.py | 3 ++- PicoW_CircuitPython_HTTP_Server/code.py | 3 ++- Pico_MIDI_Fighter/code.py | 3 ++- 13 files changed, 26 insertions(+), 13 deletions(-) diff --git a/4x4_MIDI_Messenger/code.py b/4x4_MIDI_Messenger/code.py index c2f9f2f7e..e6d8dbaec 100644 --- a/4x4_MIDI_Messenger/code.py +++ b/4x4_MIDI_Messenger/code.py @@ -8,6 +8,7 @@ from rainbowio import colorwheel import keypad import displayio +import i2cdisplaybus import busio import adafruit_seesaw.seesaw import adafruit_seesaw.neopixel @@ -50,7 +51,7 @@ i2c = board.STEMMA_I2C() # STEMMA OLED setup -display_bus = displayio.I2CDisplay(i2c, device_address=0x3D, reset=oled_reset) +display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3D, reset=oled_reset) display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=64) splash = displayio.Group() diff --git a/AHT20_OLED/code.py b/AHT20_OLED/code.py index f281abf66..c9dcf1016 100755 --- a/AHT20_OLED/code.py +++ b/AHT20_OLED/code.py @@ -11,6 +11,7 @@ # OLED import displayio +import i2cdisplaybus import terminalio from adafruit_display_text import label import adafruit_displayio_ssd1306 @@ -25,7 +26,7 @@ #OLED -display_bus = displayio.I2CDisplay(i2c, device_address=0x3C) +display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3C) display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=32) # Make the display context diff --git a/CAN_Bus_BFF/CircuitPython/can_bus_bff_receiver.py b/CAN_Bus_BFF/CircuitPython/can_bus_bff_receiver.py index 1adb9c912..c9300c012 100644 --- a/CAN_Bus_BFF/CircuitPython/can_bus_bff_receiver.py +++ b/CAN_Bus_BFF/CircuitPython/can_bus_bff_receiver.py @@ -5,6 +5,7 @@ import board import terminalio import displayio +import i2cdisplaybus from digitalio import DigitalInOut from adafruit_mcp2515.canio import Message, RemoteTransmissionRequest from adafruit_mcp2515 import MCP2515 as CAN @@ -15,7 +16,7 @@ i2c = board.STEMMA_I2C() # STEMMA OLED setup -display_bus = displayio.I2CDisplay(i2c, device_address=0x3D, reset=None) +display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3D, reset=None) display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=64) cs = DigitalInOut(board.A3) diff --git a/CircuitPython_GetSuperpower_PicoW_OpenAI/code.py b/CircuitPython_GetSuperpower_PicoW_OpenAI/code.py index 3768736c3..704adcf8f 100644 --- a/CircuitPython_GetSuperpower_PicoW_OpenAI/code.py +++ b/CircuitPython_GetSuperpower_PicoW_OpenAI/code.py @@ -7,6 +7,7 @@ import board import displayio +import i2cdisplaybus import digitalio import keypad import socketpool @@ -75,7 +76,7 @@ # STEMMA I2C on picowbell i2c = board.STEMMA_I2C() -display_bus = displayio.I2CDisplay(i2c, device_address=0x3D, reset=oled_reset) +display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3D, reset=oled_reset) WIDTH = 128 HEIGHT = 64 diff --git a/CircuitPython_KeyPad_Calculator/code/code.py b/CircuitPython_KeyPad_Calculator/code/code.py index 1b6d58b8d..67fce4c12 100644 --- a/CircuitPython_KeyPad_Calculator/code/code.py +++ b/CircuitPython_KeyPad_Calculator/code/code.py @@ -4,6 +4,7 @@ import board import displayio +import i2cdisplaybus import keypad import adafruit_displayio_sh1107 from adafruit_hid.keyboard import Keyboard @@ -57,7 +58,7 @@ def lookup(layer, key_number): # Use for I2C i2c = board.I2C() # uses board.SCL and board.SDA # i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller -display_bus = displayio.I2CDisplay(i2c, device_address=0x3C) +display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3C) # SH1107 is vertically oriented 64x128 WIDTH = 128 diff --git a/CircuitPython_OLED_Watch/code.py b/CircuitPython_OLED_Watch/code.py index 247c8845c..7b9a4a7da 100755 --- a/CircuitPython_OLED_Watch/code.py +++ b/CircuitPython_OLED_Watch/code.py @@ -4,6 +4,7 @@ import board import displayio +import i2cdisplaybus import adafruit_displayio_ssd1306 import terminalio import adafruit_ds3231 @@ -17,7 +18,7 @@ i2c = board.I2C() # uses board.SCL and board.SDA # i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller -display_bus = displayio.I2CDisplay(i2c, device_address=0x3c) +display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3c) oled = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=32) rtc = adafruit_ds3231.DS3231(i2c) diff --git a/CircuitPython_Sip_and_Puff/puff_detector.py b/CircuitPython_Sip_and_Puff/puff_detector.py index 855c64983..145a5f312 100644 --- a/CircuitPython_Sip_and_Puff/puff_detector.py +++ b/CircuitPython_Sip_and_Puff/puff_detector.py @@ -10,6 +10,7 @@ from adafruit_display_text import label from displayio import Group import displayio +import i2cdisplaybus import adafruit_displayio_ssd1306 import adafruit_lps35hw @@ -94,7 +95,7 @@ def _init_stuff(self): displayio.release_displays() i2c = board.I2C() - display_bus = displayio.I2CDisplay(i2c, device_address=0x3D) + display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3D) self.display = adafruit_displayio_ssd1306.SSD1306( display_bus, width=DISPLAY_WIDTH, height=DISPLAY_HEIGHT ) diff --git a/FunHouse_IOT_Hub/battery_peripheral/code.py b/FunHouse_IOT_Hub/battery_peripheral/code.py index 5dc93605e..7bd2ff758 100644 --- a/FunHouse_IOT_Hub/battery_peripheral/code.py +++ b/FunHouse_IOT_Hub/battery_peripheral/code.py @@ -25,6 +25,7 @@ from adafruit_io.adafruit_io import IO_MQTT import displayio +import i2cdisplaybus import terminalio from adafruit_display_text import label import adafruit_displayio_ssd1306 @@ -101,7 +102,7 @@ def message(client, feed_id, payload): i2c = board.I2C() # uses board.SCL and board.SDA # i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller -display_bus = displayio.I2CDisplay(i2c, device_address=0x3C) +display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3C) WIDTH = 128 HEIGHT = 32 diff --git a/I_Voted_Pin/code.py b/I_Voted_Pin/code.py index ff13ba3d8..ca65ebdc3 100755 --- a/I_Voted_Pin/code.py +++ b/I_Voted_Pin/code.py @@ -6,6 +6,7 @@ from adafruit_debouncer import Debouncer import digitalio import displayio +import i2cdisplaybus from adafruit_display_text import label import adafruit_displayio_ssd1306 from adafruit_bitmap_font import bitmap_font @@ -35,7 +36,7 @@ # Set up display & add group i2c = board.I2C() # uses board.SCL and board.SDA # i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller -display_bus = displayio.I2CDisplay(i2c, device_address=0x3C) +display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3C) display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=32) group = displayio.Group() display.root_group = group diff --git a/MIDI_Melody_Maker/code.py b/MIDI_Melody_Maker/code.py index b10454e2e..125825167 100644 --- a/MIDI_Melody_Maker/code.py +++ b/MIDI_Melody_Maker/code.py @@ -12,6 +12,7 @@ from digitalio import DigitalInOut, Direction, Pull from analogio import AnalogIn import displayio +import i2cdisplaybus import adafruit_imageload from adafruit_display_text import label import adafruit_displayio_ssd1306 @@ -34,7 +35,7 @@ # Use for I2C for STEMMA OLED i2c = board.I2C() # uses board.SCL and board.SDA # i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller -display_bus = displayio.I2CDisplay(i2c, device_address=0x3D, reset=oled_reset) +display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3D, reset=oled_reset) # STEMMA OLED dimensions. can have height of 64, but 32 makes text larger WIDTH = 128 diff --git a/MIDI_for_Makers/Receive_and_Display_MIDI_Messages/code.py b/MIDI_for_Makers/Receive_and_Display_MIDI_Messages/code.py index 22f5089b5..1638d195a 100644 --- a/MIDI_for_Makers/Receive_and_Display_MIDI_Messages/code.py +++ b/MIDI_for_Makers/Receive_and_Display_MIDI_Messages/code.py @@ -6,6 +6,7 @@ import usb_midi import adafruit_midi import displayio +import i2cdisplaybus import terminalio from adafruit_display_text import label import adafruit_displayio_ssd1306 @@ -26,7 +27,7 @@ # STEMMA I2C setup for CP 7.2+ # i2c = board.STEMMA_I2C() -display_bus = displayio.I2CDisplay(i2c, device_address=0x3D, reset=oled_reset) +display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3D, reset=oled_reset) # midi setup print(usb_midi.ports) diff --git a/PicoW_CircuitPython_HTTP_Server/code.py b/PicoW_CircuitPython_HTTP_Server/code.py index d56ca7205..76c721c8b 100644 --- a/PicoW_CircuitPython_HTTP_Server/code.py +++ b/PicoW_CircuitPython_HTTP_Server/code.py @@ -11,6 +11,7 @@ import board import microcontroller import displayio +import i2cdisplaybus import terminalio from adafruit_display_text import label import adafruit_displayio_ssd1306 @@ -47,7 +48,7 @@ def c_to_f(temp): # STEMMA I2C on picowbell i2c = busio.I2C(board.GP5, board.GP4) -display_bus = displayio.I2CDisplay(i2c, device_address=0x3D, reset=oled_reset) +display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3D, reset=oled_reset) WIDTH = 128 HEIGHT = 64 diff --git a/Pico_MIDI_Fighter/code.py b/Pico_MIDI_Fighter/code.py index 51ecff4f3..88ca4cf8b 100644 --- a/Pico_MIDI_Fighter/code.py +++ b/Pico_MIDI_Fighter/code.py @@ -4,6 +4,7 @@ import time import board +import i2cdisplaybus import displayio import terminalio import adafruit_aw9523 @@ -23,7 +24,7 @@ # i2c setup, higher frequency for display refresh i2c = busio.I2C(board.GP1, board.GP0, frequency=1000000) # i2c display setup -display_bus = displayio.I2CDisplay(i2c, device_address=0x3D) +display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3D) # i2c AW9523 GPIO expander setup aw = adafruit_aw9523.AW9523(i2c) # MIDI setup as MIDI out device From fe175e7acb5957531b18c819bea485724fad9285 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Thu, 21 Mar 2024 18:44:19 -0500 Subject: [PATCH 3/5] ParallelBus change --- CircuitPython_displayio/displayio_parallelbus/code.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CircuitPython_displayio/displayio_parallelbus/code.py b/CircuitPython_displayio/displayio_parallelbus/code.py index b8ea15e40..bc76ac1d0 100644 --- a/CircuitPython_displayio/displayio_parallelbus/code.py +++ b/CircuitPython_displayio/displayio_parallelbus/code.py @@ -4,13 +4,14 @@ import board import displayio +import paralleldisplaybus # Release any previously configured displays displayio.release_displays() # Setup the display bus # Tested with a Metro M4 Express -display_bus = displayio.ParallelBus(data0=board.D13, +display_bus = paralleldisplaybus.ParallelBus(data0=board.D13, command=board.D6, chip_select=board.D7, write=board.D5, From 03da135cd7b7ff9567342f610e276184ebeb0f6a Mon Sep 17 00:00:00 2001 From: foamyguy Date: Thu, 21 Mar 2024 19:19:24 -0500 Subject: [PATCH 4/5] Fourwire change --- CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py | 3 ++- CircuitPython_Flying_Toasters/code.py | 3 ++- CircuitPython_Knob_Sketcher/feather_sketcher/code.py | 3 ++- CircuitPython_Scrolling_Clouds/code.py | 3 ++- CircuitPython_displayio/displayio_display_driver/code.py | 3 ++- CircuitPython_displayio/displayio_display_manual/code.py | 3 ++- CircuitPython_qrio/adafruit_io/code.py | 3 ++- CircuitPython_qrio/repl/code.py | 3 ++- CircuitPython_qrio/usb_hid/code.py | 3 ++- Circuit_Playground_O_Phonor/notes_tft/code.py | 3 ++- .../213_tricolor_eink_fw_badge/code.py | 3 ++- .../213_tricolor_eink_fw_text/code.py | 3 ++- .../27_tricolor_eink_shield_badge/code.py | 3 ++- .../27_tricolor_eink_shield_text/code.py | 3 ++- EYESPI_BFF/CircuitPython_EYESPI_BFF/code.py | 3 ++- Faderwave_Synth/code.py | 3 ++- .../CircuitPython_ACeP_Example/code.py | 3 ++- .../CircuitPython_Tri-Color_Example/code.py | 3 ++- Kitty_Paw_Keypad/code.py | 3 ++- OV5640_Breakout/CircuitPython_Kaluga-jpeg/code.py | 3 ++- OV5640_Breakout/CircuitPython_Kaluga-lcd-mirror/code.py | 3 ++- OV5640_Breakout/CircuitPython_Pico-lcd-mirror/code.py | 3 ++- Pi_SSD_Media_Server/display-info.py | 3 ++- PipBoy_2040/code.py | 3 ++- TFT_FeatherWing_TSC2007_Demos/CircuitPython/code.py | 3 ++- TFT_FeatherWing_V2_CircuitPython_Example/code.py | 3 ++- TFT_Gizmo_Turtle_Graphics/turtle_asterix/code.py | 3 ++- TFT_Gizmo_Turtle_Graphics/turtle_benzene/code.py | 3 ++- TFT_Gizmo_Turtle_Graphics/turtle_christmas_tree/code.py | 3 ++- TFT_Gizmo_Turtle_Graphics/turtle_circle/code.py | 3 ++- TFT_Gizmo_Turtle_Graphics/turtle_circle_petals/code.py | 3 ++- TFT_Gizmo_Turtle_Graphics/turtle_hilbert/code.py | 3 ++- TFT_Gizmo_Turtle_Graphics/turtle_koch/code.py | 3 ++- TFT_Gizmo_Turtle_Graphics/turtle_parabolic_jack/code.py | 3 ++- TFT_Gizmo_Turtle_Graphics/turtle_sierpinski/code.py | 3 ++- TFT_Gizmo_Turtle_Graphics/turtle_snowflakes/code.py | 3 ++- TFT_Gizmo_Turtle_Graphics/turtle_square01/code.py | 3 ++- TFT_Gizmo_Turtle_Graphics/turtle_square_loop/code.py | 3 ++- TFT_Gizmo_Turtle_Graphics/turtle_star_fancy/code.py | 3 ++- TFT_Shield_TSC2007_Demos/CircuitPython/code.py | 3 ++- Voice2Json_Edge_Detection/demo.py | 3 ++- Walkmp3rson/code.py | 3 ++- 42 files changed, 84 insertions(+), 42 deletions(-) diff --git a/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py b/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py index d0061e03f..305c686b6 100644 --- a/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py +++ b/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py @@ -52,6 +52,7 @@ import board import busio import bitmaptools +import fourwire import displayio import sdcardio import storage @@ -68,7 +69,7 @@ def record_pressed(): displayio.release_displays() spi = busio.SPI(MOSI=board.LCD_MOSI, clock=board.LCD_CLK) -display_bus = displayio.FourWire( +display_bus = fourwire.FourWire( spi, command=board.LCD_D_C, chip_select=board.LCD_CS, diff --git a/CircuitPython_Flying_Toasters/code.py b/CircuitPython_Flying_Toasters/code.py index aa8fa3696..5e5b7ac9b 100644 --- a/CircuitPython_Flying_Toasters/code.py +++ b/CircuitPython_Flying_Toasters/code.py @@ -21,6 +21,7 @@ from random import seed, randint import board import displayio +import fourwire from adafruit_st7789 import ST7789 import adafruit_imageload @@ -63,7 +64,7 @@ def make_display(): spi.configure(baudrate=24000000) # Configure SPI for 24MHz spi.unlock() displayio.release_displays() - display_bus = displayio.FourWire(spi, command=board.D7, chip_select=board.D10, reset=board.D9) + display_bus = fourwire.FourWire(spi, command=board.D7, chip_select=board.D10, reset=board.D9) return ST7789(display_bus, width=240, height=240, rowstart=80, auto_refresh=True) diff --git a/CircuitPython_Knob_Sketcher/feather_sketcher/code.py b/CircuitPython_Knob_Sketcher/feather_sketcher/code.py index 789e1331b..ee1d1567e 100755 --- a/CircuitPython_Knob_Sketcher/feather_sketcher/code.py +++ b/CircuitPython_Knob_Sketcher/feather_sketcher/code.py @@ -9,6 +9,7 @@ import time import board import displayio +import fourwire import digitalio import analogio import adafruit_ili9341 @@ -55,7 +56,7 @@ tft_cs = board.D9 tft_dc = board.D10 tft_rst = board.D6 -display_bus = displayio.FourWire( +display_bus = fourwire.FourWire( spi, command=tft_dc, chip_select=tft_cs, reset=tft_rst ) display = adafruit_ili9341.ILI9341(display_bus, width=DISPLAY_WIDTH, height=DISPLAY_HEIGHT) diff --git a/CircuitPython_Scrolling_Clouds/code.py b/CircuitPython_Scrolling_Clouds/code.py index b3e3d67c2..adf36b942 100644 --- a/CircuitPython_Scrolling_Clouds/code.py +++ b/CircuitPython_Scrolling_Clouds/code.py @@ -21,6 +21,7 @@ from random import seed, randint import board import displayio +import fourwire from adafruit_st7789 import ST7789 import adafruit_imageload @@ -54,7 +55,7 @@ def make_display(): spi.unlock() displayio.release_displays() - display_bus = displayio.FourWire(spi, command=board.D7, chip_select=board.D10, reset=board.D9) + display_bus = fourwire.FourWire(spi, command=board.D7, chip_select=board.D10, reset=board.D9) return ST7789(display_bus, width=240, height=240, rowstart=80, auto_refresh=True) diff --git a/CircuitPython_displayio/displayio_display_driver/code.py b/CircuitPython_displayio/displayio_display_driver/code.py index ca8026e49..8db5bd99e 100644 --- a/CircuitPython_displayio/displayio_display_driver/code.py +++ b/CircuitPython_displayio/displayio_display_driver/code.py @@ -4,6 +4,7 @@ import board import displayio +import fourwire import adafruit_ili9341 # Release any previously configured displays @@ -17,7 +18,7 @@ tft_dc = board.D9 # Setup the display bus -display_bus = displayio.FourWire(spi_bus, command=tft_dc, chip_select=tft_cs) +display_bus = fourwire.FourWire(spi_bus, command=tft_dc, chip_select=tft_cs) # Setup the Display display = adafruit_ili9341.ILI9341(display_bus, width=320, height=240) diff --git a/CircuitPython_displayio/displayio_display_manual/code.py b/CircuitPython_displayio/displayio_display_manual/code.py index 60ba96c38..63bb84cf7 100644 --- a/CircuitPython_displayio/displayio_display_manual/code.py +++ b/CircuitPython_displayio/displayio_display_manual/code.py @@ -4,6 +4,7 @@ import board import displayio +import fourwire # Release any previously configured displays displayio.release_displays() @@ -16,7 +17,7 @@ tft_dc = board.D9 # Setup the display bus -display_bus = displayio.FourWire(spi_bus, command=tft_dc, chip_select=tft_cs) +display_bus = fourwire.FourWire(spi_bus, command=tft_dc, chip_select=tft_cs) # Setup the initialization sequence # stolen from adafruit_ili9341.py diff --git a/CircuitPython_qrio/adafruit_io/code.py b/CircuitPython_qrio/adafruit_io/code.py index 9c0d4ab0f..84326cb04 100644 --- a/CircuitPython_qrio/adafruit_io/code.py +++ b/CircuitPython_qrio/adafruit_io/code.py @@ -15,6 +15,7 @@ import board import busio import displayio +import fourwire import qrio import socketpool import wifi @@ -30,7 +31,7 @@ print("Initializing display") displayio.release_displays() spi = busio.SPI(MOSI=board.LCD_MOSI, clock=board.LCD_CLK) -display_bus = displayio.FourWire( +display_bus = fourwire.FourWire( spi, command=board.LCD_D_C, chip_select=board.LCD_CS, reset=board.LCD_RST ) display = ILI9341(display_bus, width=320, height=240, rotation=90) diff --git a/CircuitPython_qrio/repl/code.py b/CircuitPython_qrio/repl/code.py index 62814d4a4..23cf5dbba 100644 --- a/CircuitPython_qrio/repl/code.py +++ b/CircuitPython_qrio/repl/code.py @@ -12,6 +12,7 @@ import board import busio import displayio +import fourwire import qrio import adafruit_ov2640 from adafruit_display_text.bitmap_label import Label @@ -20,7 +21,7 @@ print("Initializing display") displayio.release_displays() spi = busio.SPI(MOSI=board.LCD_MOSI, clock=board.LCD_CLK) -display_bus = displayio.FourWire( +display_bus = fourwire.FourWire( spi, command=board.LCD_D_C, chip_select=board.LCD_CS, reset=board.LCD_RST ) display = ILI9341(display_bus, width=320, height=240, rotation=90) diff --git a/CircuitPython_qrio/usb_hid/code.py b/CircuitPython_qrio/usb_hid/code.py index b08cc8780..5d7aeeee6 100644 --- a/CircuitPython_qrio/usb_hid/code.py +++ b/CircuitPython_qrio/usb_hid/code.py @@ -13,6 +13,7 @@ import board import busio import displayio +import fourwire import qrio import adafruit_ov2640 from adafruit_display_text.bitmap_label import Label @@ -24,7 +25,7 @@ print("Initializing display") displayio.release_displays() spi = busio.SPI(MOSI=board.LCD_MOSI, clock=board.LCD_CLK) -display_bus = displayio.FourWire( +display_bus = fourwire.FourWire( spi, command=board.LCD_D_C, chip_select=board.LCD_CS, reset=board.LCD_RST ) display = ILI9341(display_bus, width=320, height=240, rotation=90) diff --git a/Circuit_Playground_O_Phonor/notes_tft/code.py b/Circuit_Playground_O_Phonor/notes_tft/code.py index cbfc308d0..b0114e1d9 100755 --- a/Circuit_Playground_O_Phonor/notes_tft/code.py +++ b/Circuit_Playground_O_Phonor/notes_tft/code.py @@ -8,6 +8,7 @@ import busio import audiobusio import displayio +import fourwire from adafruit_st7789 import ST7789 from adafruit_bitmap_font import bitmap_font from adafruit_display_text import label @@ -46,7 +47,7 @@ tft_dc = board.TX tft_backlight = board.A3 -display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs) +display_bus = fourwire.FourWire(spi, command=tft_dc, chip_select=tft_cs) display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=tft_backlight, rotation=180) diff --git a/EInk_CircuitPython_Quickstart/213_tricolor_eink_fw_badge/code.py b/EInk_CircuitPython_Quickstart/213_tricolor_eink_fw_badge/code.py index dfb39569c..2f6366239 100644 --- a/EInk_CircuitPython_Quickstart/213_tricolor_eink_fw_badge/code.py +++ b/EInk_CircuitPython_Quickstart/213_tricolor_eink_fw_badge/code.py @@ -17,6 +17,7 @@ import time import board import displayio +import fourwire import adafruit_il0373 import terminalio from adafruit_display_text import label @@ -43,7 +44,7 @@ epd_busy = board.D6 # Create the displayio connection to the display pins -display_bus = displayio.FourWire(spi, command=epd_dc, chip_select=epd_cs, +display_bus = fourwire.FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000) time.sleep(1) # Wait a bit diff --git a/EInk_CircuitPython_Quickstart/213_tricolor_eink_fw_text/code.py b/EInk_CircuitPython_Quickstart/213_tricolor_eink_fw_text/code.py index 1a0233bb9..8a1edaada 100644 --- a/EInk_CircuitPython_Quickstart/213_tricolor_eink_fw_text/code.py +++ b/EInk_CircuitPython_Quickstart/213_tricolor_eink_fw_text/code.py @@ -18,6 +18,7 @@ import time import board import displayio +import fourwire import adafruit_il0373 import terminalio from adafruit_display_text import label @@ -44,7 +45,7 @@ epd_busy = board.D6 # Create the displayio connection to the display pins -display_bus = displayio.FourWire(spi, command=epd_dc, chip_select=epd_cs, +display_bus = fourwire.FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000) time.sleep(1) # Wait a bit diff --git a/EInk_CircuitPython_Quickstart/27_tricolor_eink_shield_badge/code.py b/EInk_CircuitPython_Quickstart/27_tricolor_eink_shield_badge/code.py index 24ba5313f..42e8ab064 100644 --- a/EInk_CircuitPython_Quickstart/27_tricolor_eink_shield_badge/code.py +++ b/EInk_CircuitPython_Quickstart/27_tricolor_eink_shield_badge/code.py @@ -16,6 +16,7 @@ import time import board import displayio +import fourwire import adafruit_il91874 import terminalio from adafruit_display_text import label @@ -39,7 +40,7 @@ epd_dc = board.D9 # Create the displayio connection to the display pins -display_bus = displayio.FourWire(spi, command=epd_dc, chip_select=epd_cs, +display_bus = fourwire.FourWire(spi, command=epd_dc, chip_select=epd_cs, baudrate=1000000) time.sleep(1) # Wait a bit diff --git a/EInk_CircuitPython_Quickstart/27_tricolor_eink_shield_text/code.py b/EInk_CircuitPython_Quickstart/27_tricolor_eink_shield_text/code.py index 4605002e6..8f45e237f 100644 --- a/EInk_CircuitPython_Quickstart/27_tricolor_eink_shield_text/code.py +++ b/EInk_CircuitPython_Quickstart/27_tricolor_eink_shield_text/code.py @@ -15,6 +15,7 @@ import time import board import displayio +import fourwire import adafruit_il91874 import terminalio from adafruit_display_text import label @@ -38,7 +39,7 @@ epd_dc = board.D9 # Create the displayio connection to the display pins -display_bus = displayio.FourWire(spi, command=epd_dc, chip_select=epd_cs, +display_bus = fourwire.FourWire(spi, command=epd_dc, chip_select=epd_cs, baudrate=1000000) time.sleep(1) # Wait a bit diff --git a/EYESPI_BFF/CircuitPython_EYESPI_BFF/code.py b/EYESPI_BFF/CircuitPython_EYESPI_BFF/code.py index cab770b6c..8a9f3f214 100644 --- a/EYESPI_BFF/CircuitPython_EYESPI_BFF/code.py +++ b/EYESPI_BFF/CircuitPython_EYESPI_BFF/code.py @@ -10,6 +10,7 @@ from random import randint import time import displayio +import fourwire import board import vectorio import terminalio @@ -29,7 +30,7 @@ tft_cs = board.TX tft_dc = board.RX -display_bus = displayio.FourWire( +display_bus = fourwire.FourWire( spi, command=tft_dc, chip_select=tft_cs, reset=None ) diff --git a/Faderwave_Synth/code.py b/Faderwave_Synth/code.py index 5f4579e4f..08fb4f0dc 100644 --- a/Faderwave_Synth/code.py +++ b/Faderwave_Synth/code.py @@ -13,6 +13,7 @@ import rotaryio from digitalio import DigitalInOut, Pull import displayio +import fourwire from adafruit_display_text import label from adafruit_display_shapes.rect import Rect import terminalio @@ -88,7 +89,7 @@ OLED_CS = board.D11 spi = board.SPI() -display_bus = displayio.FourWire(spi, command=OLED_DC, chip_select=OLED_CS, +display_bus = fourwire.FourWire(spi, command=OLED_DC, chip_select=OLED_CS, reset=OLED_RST, baudrate=30_000_000) display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=64) diff --git a/Feather_RP2040_ThinkInk_Examples/CircuitPython_ACeP_Example/code.py b/Feather_RP2040_ThinkInk_Examples/CircuitPython_ACeP_Example/code.py index 91f3be282..b8349cc77 100644 --- a/Feather_RP2040_ThinkInk_Examples/CircuitPython_ACeP_Example/code.py +++ b/Feather_RP2040_ThinkInk_Examples/CircuitPython_ACeP_Example/code.py @@ -8,6 +8,7 @@ import board import displayio +import fourwire import busio import adafruit_spd1656 @@ -19,7 +20,7 @@ epd_dc = board.EPD_DC epd_reset = board.EPD_RESET epd_busy = board.EPD_BUSY -display_bus = displayio.FourWire( +display_bus = fourwire.FourWire( spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000 ) diff --git a/Feather_RP2040_ThinkInk_Examples/CircuitPython_Tri-Color_Example/code.py b/Feather_RP2040_ThinkInk_Examples/CircuitPython_Tri-Color_Example/code.py index f415eea80..b43f3b6f0 100644 --- a/Feather_RP2040_ThinkInk_Examples/CircuitPython_Tri-Color_Example/code.py +++ b/Feather_RP2040_ThinkInk_Examples/CircuitPython_Tri-Color_Example/code.py @@ -9,6 +9,7 @@ import time import board import displayio +import fourwire import busio import adafruit_ssd1680 @@ -20,7 +21,7 @@ epd_dc = board.EPD_DC epd_reset = board.EPD_RESET epd_busy = board.EPD_BUSY -display_bus = displayio.FourWire( +display_bus = fourwire.FourWire( spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000 ) time.sleep(1) diff --git a/Kitty_Paw_Keypad/code.py b/Kitty_Paw_Keypad/code.py index c3d9ad70b..05b53dde0 100644 --- a/Kitty_Paw_Keypad/code.py +++ b/Kitty_Paw_Keypad/code.py @@ -4,6 +4,7 @@ import board import displayio +import fourwire import keypad from adafruit_st7789 import ST7789 import adafruit_imageload @@ -50,7 +51,7 @@ tft_cs = board.D7 tft_dc = board.D5 -display_bus = displayio.FourWire( +display_bus = fourwire.FourWire( spi, command=tft_dc, chip_select=tft_cs, reset=board.D6 ) diff --git a/OV5640_Breakout/CircuitPython_Kaluga-jpeg/code.py b/OV5640_Breakout/CircuitPython_Kaluga-jpeg/code.py index 946e8761f..483c74f6d 100644 --- a/OV5640_Breakout/CircuitPython_Kaluga-jpeg/code.py +++ b/OV5640_Breakout/CircuitPython_Kaluga-jpeg/code.py @@ -25,6 +25,7 @@ import board import busio import displayio +import fourwire import espcamera import espidf import keypad @@ -34,7 +35,7 @@ print("Initializing display") displayio.release_displays() spi = busio.SPI(MOSI=board.LCD_MOSI, clock=board.LCD_CLK) -display_bus = displayio.FourWire( +display_bus = fourwire.FourWire( spi, command=board.LCD_D_C, chip_select=board.LCD_CS, diff --git a/OV5640_Breakout/CircuitPython_Kaluga-lcd-mirror/code.py b/OV5640_Breakout/CircuitPython_Kaluga-lcd-mirror/code.py index ad9d09b60..b7d23707c 100644 --- a/OV5640_Breakout/CircuitPython_Kaluga-lcd-mirror/code.py +++ b/OV5640_Breakout/CircuitPython_Kaluga-lcd-mirror/code.py @@ -19,13 +19,14 @@ import busio import keypad import displayio +import fourwire import espcamera import espidf print("Initializing display") displayio.release_displays() spi = busio.SPI(MOSI=board.LCD_MOSI, clock=board.LCD_CLK) -display_bus = displayio.FourWire( +display_bus = fourwire.FourWire( spi, command=board.LCD_D_C, chip_select=board.LCD_CS, diff --git a/OV5640_Breakout/CircuitPython_Pico-lcd-mirror/code.py b/OV5640_Breakout/CircuitPython_Pico-lcd-mirror/code.py index 24b6d8c43..c652a28bb 100644 --- a/OV5640_Breakout/CircuitPython_Pico-lcd-mirror/code.py +++ b/OV5640_Breakout/CircuitPython_Pico-lcd-mirror/code.py @@ -13,11 +13,12 @@ import adafruit_ov5640 import adafruit_st7789 import displayio +import fourwire # Set up the display (You must customize this block for your display!) displayio.release_displays() spi = busio.SPI(clock=board.GP2, MOSI=board.GP3) -display_bus = displayio.FourWire(spi, command=board.GP0, chip_select=board.GP1, reset=None) +display_bus = fourwire.FourWire(spi, command=board.GP0, chip_select=board.GP1, reset=None) display = adafruit_st7789.ST7789(display_bus, width=240, height=240, rowstart=80, rotation=0) print("construct bus") diff --git a/Pi_SSD_Media_Server/display-info.py b/Pi_SSD_Media_Server/display-info.py index 41aee65ac..6b49f4e7f 100755 --- a/Pi_SSD_Media_Server/display-info.py +++ b/Pi_SSD_Media_Server/display-info.py @@ -4,6 +4,7 @@ import subprocess import board import displayio +import fourwire from adafruit_display_text import label from adafruit_bitmap_font import bitmap_font from adafruit_st7789 import ST7789 @@ -23,7 +24,7 @@ tft_dc = board.D25 tft_rst = board.D24 -display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=tft_rst) +display_bus = fourwire.FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=tft_rst) display = ST7789(display_bus, width=320, height=170, colstart=35, rotation=270) diff --git a/PipBoy_2040/code.py b/PipBoy_2040/code.py index 997875c08..7249fb84d 100644 --- a/PipBoy_2040/code.py +++ b/PipBoy_2040/code.py @@ -4,6 +4,7 @@ import board from adafruit_simplemath import map_range import displayio +import fourwire from adafruit_seesaw.seesaw import Seesaw import adafruit_imageload from adafruit_st7789 import ST7789 @@ -17,7 +18,7 @@ spi = board.SPI() # setup for display over SPI tft_cs = board.D5 tft_dc = board.D6 -display_bus = displayio.FourWire( +display_bus = fourwire.FourWire( spi, command=tft_dc, chip_select=tft_cs, reset=board.D9 ) diff --git a/TFT_FeatherWing_TSC2007_Demos/CircuitPython/code.py b/TFT_FeatherWing_TSC2007_Demos/CircuitPython/code.py index c2c9ba604..6fdc2b0a1 100644 --- a/TFT_FeatherWing_TSC2007_Demos/CircuitPython/code.py +++ b/TFT_FeatherWing_TSC2007_Demos/CircuitPython/code.py @@ -10,6 +10,7 @@ import os import board import displayio +import fourwire import adafruit_ili9341 import adafruit_tsc2007 @@ -25,7 +26,7 @@ display_width = 320 display_height = 240 -display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs) +display_bus = fourwire.FourWire(spi, command=tft_dc, chip_select=tft_cs) display = adafruit_ili9341.ILI9341(display_bus, width=display_width, height=display_height) i2c = board.STEMMA_I2C() diff --git a/TFT_FeatherWing_V2_CircuitPython_Example/code.py b/TFT_FeatherWing_V2_CircuitPython_Example/code.py index 118b7cb3f..d8defda1b 100644 --- a/TFT_FeatherWing_V2_CircuitPython_Example/code.py +++ b/TFT_FeatherWing_V2_CircuitPython_Example/code.py @@ -10,6 +10,7 @@ import os import board import displayio +import fourwire import adafruit_hx8357 import adafruit_tsc2007 @@ -25,7 +26,7 @@ display_width = 480 display_height = 320 -display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs) +display_bus = fourwire.FourWire(spi, command=tft_dc, chip_select=tft_cs) display = adafruit_hx8357.HX8357(display_bus, width=display_width, height=display_height) i2c = board.STEMMA_I2C() diff --git a/TFT_Gizmo_Turtle_Graphics/turtle_asterix/code.py b/TFT_Gizmo_Turtle_Graphics/turtle_asterix/code.py index 0b8e36631..88a772075 100644 --- a/TFT_Gizmo_Turtle_Graphics/turtle_asterix/code.py +++ b/TFT_Gizmo_Turtle_Graphics/turtle_asterix/code.py @@ -7,11 +7,12 @@ import board import busio import displayio +import fourwire from adafruit_st7789 import ST7789 from adafruit_turtle import turtle displayio.release_displays() spi = busio.SPI(board.SCL, MOSI=board.SDA) -display_bus = displayio.FourWire(spi, command=board.TX, chip_select=board.RX) +display_bus = fourwire.FourWire(spi, command=board.TX, chip_select=board.RX) display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=board.A3, rotation=180) turtle = turtle(display) diff --git a/TFT_Gizmo_Turtle_Graphics/turtle_benzene/code.py b/TFT_Gizmo_Turtle_Graphics/turtle_benzene/code.py index 55e876394..f28f63151 100644 --- a/TFT_Gizmo_Turtle_Graphics/turtle_benzene/code.py +++ b/TFT_Gizmo_Turtle_Graphics/turtle_benzene/code.py @@ -7,11 +7,12 @@ import board import busio import displayio +import fourwire from adafruit_st7789 import ST7789 from adafruit_turtle import Color, turtle displayio.release_displays() spi = busio.SPI(board.SCL, MOSI=board.SDA) -display_bus = displayio.FourWire(spi, command=board.TX, chip_select=board.RX) +display_bus = fourwire.FourWire(spi, command=board.TX, chip_select=board.RX) display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=board.A3, rotation=180) turtle = turtle(display) diff --git a/TFT_Gizmo_Turtle_Graphics/turtle_christmas_tree/code.py b/TFT_Gizmo_Turtle_Graphics/turtle_christmas_tree/code.py index 063550866..8910a049b 100644 --- a/TFT_Gizmo_Turtle_Graphics/turtle_christmas_tree/code.py +++ b/TFT_Gizmo_Turtle_Graphics/turtle_christmas_tree/code.py @@ -7,11 +7,12 @@ import board import busio import displayio +import fourwire from adafruit_st7789 import ST7789 from adafruit_turtle import Color, turtle displayio.release_displays() spi = busio.SPI(board.SCL, MOSI=board.SDA) -display_bus = displayio.FourWire(spi, command=board.TX, chip_select=board.RX) +display_bus = fourwire.FourWire(spi, command=board.TX, chip_select=board.RX) display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=board.A3, rotation=180) turtle = turtle(display) diff --git a/TFT_Gizmo_Turtle_Graphics/turtle_circle/code.py b/TFT_Gizmo_Turtle_Graphics/turtle_circle/code.py index c4fa7082b..44dcb08c3 100644 --- a/TFT_Gizmo_Turtle_Graphics/turtle_circle/code.py +++ b/TFT_Gizmo_Turtle_Graphics/turtle_circle/code.py @@ -7,11 +7,12 @@ import board import busio import displayio +import fourwire from adafruit_st7789 import ST7789 from adafruit_turtle import turtle displayio.release_displays() spi = busio.SPI(board.SCL, MOSI=board.SDA) -display_bus = displayio.FourWire(spi, command=board.TX, chip_select=board.RX) +display_bus = fourwire.FourWire(spi, command=board.TX, chip_select=board.RX) display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=board.A3, rotation=180) turtle = turtle(display) diff --git a/TFT_Gizmo_Turtle_Graphics/turtle_circle_petals/code.py b/TFT_Gizmo_Turtle_Graphics/turtle_circle_petals/code.py index 50497af58..c37c64a7d 100644 --- a/TFT_Gizmo_Turtle_Graphics/turtle_circle_petals/code.py +++ b/TFT_Gizmo_Turtle_Graphics/turtle_circle_petals/code.py @@ -7,11 +7,12 @@ import board import busio import displayio +import fourwire from adafruit_st7789 import ST7789 from adafruit_turtle import Color, turtle displayio.release_displays() spi = busio.SPI(board.SCL, MOSI=board.SDA) -display_bus = displayio.FourWire(spi, command=board.TX, chip_select=board.RX) +display_bus = fourwire.FourWire(spi, command=board.TX, chip_select=board.RX) display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=board.A3, rotation=180) turtle = turtle(display) diff --git a/TFT_Gizmo_Turtle_Graphics/turtle_hilbert/code.py b/TFT_Gizmo_Turtle_Graphics/turtle_hilbert/code.py index 6697bb993..d7c9cd456 100644 --- a/TFT_Gizmo_Turtle_Graphics/turtle_hilbert/code.py +++ b/TFT_Gizmo_Turtle_Graphics/turtle_hilbert/code.py @@ -7,11 +7,12 @@ import board import busio import displayio +import fourwire from adafruit_st7789 import ST7789 from adafruit_turtle import Color, turtle displayio.release_displays() spi = busio.SPI(board.SCL, MOSI=board.SDA) -display_bus = displayio.FourWire(spi, command=board.TX, chip_select=board.RX) +display_bus = fourwire.FourWire(spi, command=board.TX, chip_select=board.RX) display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=board.A3, rotation=180) turtle = turtle(display) diff --git a/TFT_Gizmo_Turtle_Graphics/turtle_koch/code.py b/TFT_Gizmo_Turtle_Graphics/turtle_koch/code.py index 043a123f3..43db6a04d 100644 --- a/TFT_Gizmo_Turtle_Graphics/turtle_koch/code.py +++ b/TFT_Gizmo_Turtle_Graphics/turtle_koch/code.py @@ -7,11 +7,12 @@ import board import busio import displayio +import fourwire from adafruit_st7789 import ST7789 from adafruit_turtle import turtle displayio.release_displays() spi = busio.SPI(board.SCL, MOSI=board.SDA) -display_bus = displayio.FourWire(spi, command=board.TX, chip_select=board.RX) +display_bus = fourwire.FourWire(spi, command=board.TX, chip_select=board.RX) display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=board.A3, rotation=180) turtle = turtle(display) diff --git a/TFT_Gizmo_Turtle_Graphics/turtle_parabolic_jack/code.py b/TFT_Gizmo_Turtle_Graphics/turtle_parabolic_jack/code.py index 2c2679603..f94072e5d 100644 --- a/TFT_Gizmo_Turtle_Graphics/turtle_parabolic_jack/code.py +++ b/TFT_Gizmo_Turtle_Graphics/turtle_parabolic_jack/code.py @@ -7,11 +7,12 @@ import board import busio import displayio +import fourwire from adafruit_st7789 import ST7789 from adafruit_turtle import Color, turtle displayio.release_displays() spi = busio.SPI(board.SCL, MOSI=board.SDA) -display_bus = displayio.FourWire(spi, command=board.TX, chip_select=board.RX) +display_bus = fourwire.FourWire(spi, command=board.TX, chip_select=board.RX) display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=board.A3, rotation=180) turtle = turtle(display) diff --git a/TFT_Gizmo_Turtle_Graphics/turtle_sierpinski/code.py b/TFT_Gizmo_Turtle_Graphics/turtle_sierpinski/code.py index 9adf706b3..87be598fe 100644 --- a/TFT_Gizmo_Turtle_Graphics/turtle_sierpinski/code.py +++ b/TFT_Gizmo_Turtle_Graphics/turtle_sierpinski/code.py @@ -7,11 +7,12 @@ import board import busio import displayio +import fourwire from adafruit_st7789 import ST7789 from adafruit_turtle import turtle displayio.release_displays() spi = busio.SPI(board.SCL, MOSI=board.SDA) -display_bus = displayio.FourWire(spi, command=board.TX, chip_select=board.RX) +display_bus = fourwire.FourWire(spi, command=board.TX, chip_select=board.RX) display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=board.A3, rotation=180) turtle = turtle(display) diff --git a/TFT_Gizmo_Turtle_Graphics/turtle_snowflakes/code.py b/TFT_Gizmo_Turtle_Graphics/turtle_snowflakes/code.py index d2a1d9c56..5e78640a5 100644 --- a/TFT_Gizmo_Turtle_Graphics/turtle_snowflakes/code.py +++ b/TFT_Gizmo_Turtle_Graphics/turtle_snowflakes/code.py @@ -9,11 +9,12 @@ import board import busio import displayio +import fourwire from adafruit_st7789 import ST7789 from adafruit_turtle import turtle displayio.release_displays() spi = busio.SPI(board.SCL, MOSI=board.SDA) -display_bus = displayio.FourWire(spi, command=board.TX, chip_select=board.RX) +display_bus = fourwire.FourWire(spi, command=board.TX, chip_select=board.RX) display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=board.A3, rotation=180) turtle = turtle(display) diff --git a/TFT_Gizmo_Turtle_Graphics/turtle_square01/code.py b/TFT_Gizmo_Turtle_Graphics/turtle_square01/code.py index 344569b45..6542b44f8 100644 --- a/TFT_Gizmo_Turtle_Graphics/turtle_square01/code.py +++ b/TFT_Gizmo_Turtle_Graphics/turtle_square01/code.py @@ -7,11 +7,12 @@ import board import busio import displayio +import fourwire from adafruit_st7789 import ST7789 from adafruit_turtle import turtle displayio.release_displays() spi = busio.SPI(board.SCL, MOSI=board.SDA) -display_bus = displayio.FourWire(spi, command=board.TX, chip_select=board.RX) +display_bus = fourwire.FourWire(spi, command=board.TX, chip_select=board.RX) display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=board.A3, rotation=180) turtle = turtle(display) diff --git a/TFT_Gizmo_Turtle_Graphics/turtle_square_loop/code.py b/TFT_Gizmo_Turtle_Graphics/turtle_square_loop/code.py index b2ae90462..eddf04879 100644 --- a/TFT_Gizmo_Turtle_Graphics/turtle_square_loop/code.py +++ b/TFT_Gizmo_Turtle_Graphics/turtle_square_loop/code.py @@ -7,11 +7,12 @@ import board import busio import displayio +import fourwire from adafruit_st7789 import ST7789 from adafruit_turtle import turtle displayio.release_displays() spi = busio.SPI(board.SCL, MOSI=board.SDA) -display_bus = displayio.FourWire(spi, command=board.TX, chip_select=board.RX) +display_bus = fourwire.FourWire(spi, command=board.TX, chip_select=board.RX) display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=board.A3, rotation=180) turtle = turtle(display) diff --git a/TFT_Gizmo_Turtle_Graphics/turtle_star_fancy/code.py b/TFT_Gizmo_Turtle_Graphics/turtle_star_fancy/code.py index 5629730f7..400d2a4ed 100644 --- a/TFT_Gizmo_Turtle_Graphics/turtle_star_fancy/code.py +++ b/TFT_Gizmo_Turtle_Graphics/turtle_star_fancy/code.py @@ -7,11 +7,12 @@ import board import busio import displayio +import fourwire from adafruit_st7789 import ST7789 from adafruit_turtle import Color, turtle displayio.release_displays() spi = busio.SPI(board.SCL, MOSI=board.SDA) -display_bus = displayio.FourWire(spi, command=board.TX, chip_select=board.RX) +display_bus = fourwire.FourWire(spi, command=board.TX, chip_select=board.RX) display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=board.A3, rotation=180) turtle = turtle(display) diff --git a/TFT_Shield_TSC2007_Demos/CircuitPython/code.py b/TFT_Shield_TSC2007_Demos/CircuitPython/code.py index d24e070ae..24fb8ba96 100644 --- a/TFT_Shield_TSC2007_Demos/CircuitPython/code.py +++ b/TFT_Shield_TSC2007_Demos/CircuitPython/code.py @@ -10,6 +10,7 @@ import os import board import displayio +import fourwire import adafruit_ili9341 import adafruit_tsc2007 @@ -29,7 +30,7 @@ display_width = 320 display_height = 240 -display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs) +display_bus = fourwire.FourWire(spi, command=tft_dc, chip_select=tft_cs) display = adafruit_ili9341.ILI9341(display_bus, width=display_width, height=display_height) i2c = board.I2C() diff --git a/Voice2Json_Edge_Detection/demo.py b/Voice2Json_Edge_Detection/demo.py index 9ec8b9559..03682d7cd 100644 --- a/Voice2Json_Edge_Detection/demo.py +++ b/Voice2Json_Edge_Detection/demo.py @@ -10,6 +10,7 @@ from datetime import datetime import board import displayio +import fourwire import adafruit_dotstar from adafruit_st7789 import ST7789 @@ -98,7 +99,7 @@ def process_output(line): tft_dc = board.D25 tft_lite = board.D26 -display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs) +display_bus = fourwire.FourWire(spi, command=tft_dc, chip_select=tft_cs) display = ST7789( display_bus, diff --git a/Walkmp3rson/code.py b/Walkmp3rson/code.py index 2b895f549..45fd6c98e 100644 --- a/Walkmp3rson/code.py +++ b/Walkmp3rson/code.py @@ -14,6 +14,7 @@ from adafruit_neokey.neokey1x4 import NeoKey1x4 from adafruit_seesaw import seesaw, rotaryio import displayio +import fourwire import terminalio from adafruit_display_text import label from adafruit_st7789 import ST7789 @@ -29,7 +30,7 @@ tft_cs = board.D6 tft_dc = board.D9 tft_reset = board.D12 -display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=tft_reset) +display_bus = fourwire.FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=tft_reset) display = ST7789(display_bus, width=320, height=240, rotation=90) # SD Card setup From 93d32ea0bb328b88732a4244b7ce0f11195f0ae1 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Thu, 21 Mar 2024 19:33:28 -0500 Subject: [PATCH 5/5] BusDisplay change --- CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py | 3 ++- CircuitPython_displayio/displayio_display_manual/code.py | 3 ++- CircuitPython_displayio/displayio_parallelbus/code.py | 3 ++- OV5640_Breakout/CircuitPython_Kaluga-jpeg/code.py | 3 ++- OV5640_Breakout/CircuitPython_Kaluga-lcd-mirror/code.py | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py b/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py index 305c686b6..4db78ec64 100644 --- a/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py +++ b/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py @@ -54,6 +54,7 @@ import bitmaptools import fourwire import displayio +import busdisplay import sdcardio import storage import gifio @@ -102,7 +103,7 @@ def record_pressed(): b"\x29\x80\x78" # Display on then delay 0x78 (120ms) ) -display = displayio.Display(display_bus, _INIT_SEQUENCE, width=320, height=240) +display = busdisplay.BusDisplay(display_bus, _INIT_SEQUENCE, width=320, height=240) sd_spi = busio.SPI(clock=board.IO18, MOSI=board.IO14, MISO=board.IO17) sd_cs = board.IO12 diff --git a/CircuitPython_displayio/displayio_display_manual/code.py b/CircuitPython_displayio/displayio_display_manual/code.py index 63bb84cf7..439692743 100644 --- a/CircuitPython_displayio/displayio_display_manual/code.py +++ b/CircuitPython_displayio/displayio_display_manual/code.py @@ -4,6 +4,7 @@ import board import displayio +import busdisplay import fourwire # Release any previously configured displays @@ -48,7 +49,7 @@ ) # Setup the Display -display = displayio.Display(display_bus, INIT_SEQUENCE, width=320, height=240) +display = busdisplay.BusDisplay(display_bus, INIT_SEQUENCE, width=320, height=240) # # DONE - now you can use the display however you want diff --git a/CircuitPython_displayio/displayio_parallelbus/code.py b/CircuitPython_displayio/displayio_parallelbus/code.py index bc76ac1d0..092c564e6 100644 --- a/CircuitPython_displayio/displayio_parallelbus/code.py +++ b/CircuitPython_displayio/displayio_parallelbus/code.py @@ -4,6 +4,7 @@ import board import displayio +import busdisplay import paralleldisplaybus # Release any previously configured displays @@ -46,7 +47,7 @@ ) # Setup the Display -display = displayio.Display(display_bus, INIT_SEQUENCE, width=320, height=240) +display = busdisplay.BusDisplay(display_bus, INIT_SEQUENCE, width=320, height=240) # # DONE - now you can use the display however you want diff --git a/OV5640_Breakout/CircuitPython_Kaluga-jpeg/code.py b/OV5640_Breakout/CircuitPython_Kaluga-jpeg/code.py index 483c74f6d..4353465bf 100644 --- a/OV5640_Breakout/CircuitPython_Kaluga-jpeg/code.py +++ b/OV5640_Breakout/CircuitPython_Kaluga-jpeg/code.py @@ -25,6 +25,7 @@ import board import busio import displayio +import busdisplay import fourwire import espcamera import espidf @@ -68,7 +69,7 @@ b"\x29\x80\x78" # Display on then delay 0x78 (120ms) ) -display = displayio.Display(display_bus, _INIT_SEQUENCE, width=320, height=240) +display = busdisplay.BusDisplay(display_bus, _INIT_SEQUENCE, width=320, height=240) if espidf.get_reserved_psram() < 1047586: print("""Place the following line in CIRCUITPY/settings.toml, then hard-reset the board: diff --git a/OV5640_Breakout/CircuitPython_Kaluga-lcd-mirror/code.py b/OV5640_Breakout/CircuitPython_Kaluga-lcd-mirror/code.py index b7d23707c..0ff64067e 100644 --- a/OV5640_Breakout/CircuitPython_Kaluga-lcd-mirror/code.py +++ b/OV5640_Breakout/CircuitPython_Kaluga-lcd-mirror/code.py @@ -19,6 +19,7 @@ import busio import keypad import displayio +import busdisplay import fourwire import espcamera import espidf @@ -59,7 +60,7 @@ b"\x29\x80\x78" # Display on then delay 0x78 (120ms) ) -display = displayio.Display(display_bus, _INIT_SEQUENCE, width=320, height=240) +display = busdisplay.BusDisplay(display_bus, _INIT_SEQUENCE, width=320, height=240) if espidf.get_reserved_psram() < 1047586: print("""Place the following line in CIRCUITPY/settings.toml, then hard-reset the board: