The CircuitPython_FruitJam library provides a cleaner interface for using HSTX DVI video. The board does not need to be a Fruit Jam (currently) but it must use HSTX video to a DVI breakout, such as the Adafruit Feather RP2350 and Adafruit Metro RP2350.
This is a cleaner way to set video values than setting up a Framebuffer. Especially on the Adafruit Fruit Jam board.
The display setup helper will only work for devices that have the following pin names defined: board.CKP, board.CKN, board.CKN, board.D0N, board.D1P, board.D1N, board.D2P, board.D2N in the boards library.
If you have a different pin mapping from HSTX to DVI than the one above, you should define your own framebuffer as noted later in this guide.
# SPDX-FileCopyrightText: 2025 Tim Cocks, written for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# NOTE: Make sure you've created your settings.toml file before running this example
# https://learn.adafruit.com/adafruit-pyportal/create-your-settings-toml-file
from adafruit_fruitjam import FruitJam
# Set a data source URL
TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html"
# Create the PyPortal object
fruitjam = FruitJam(url=TEXT_URL, text_position=(10, 20))
fruitjam.neopixels.brightness = 0.1
# Go get that data
print("Fetching text from", TEXT_URL)
data = fruitjam.fetch()
# Print out what we got
print("-" * 40)
print(data)
print("-" * 40)
while True:
pass
An optional color_depth parameter can be added in the latest iteration:
from adafruit_fruitjam.peripherals import request_display_config # Use the easy library call to set the resolution request_display_config(640, 480, color_depth=8) # Ask for a 640x480 display with 8 bit color depth
As a helper, there is a new get_display_configuration() function that will return the width, height, and color depth of the current display as a tuple with 3 elements. If the display isn't initialized, it returns (None, None, None).
from adafruit_fruitjam.peripherals import get_display_config display_config = get_display_config() print(display_config)
The default resolutions when calling request_display_config() are below.
- 320x240 (default 16 bit color)
- 360x200 (default 16 bit color)
- 640x480 (default 8 bit color)
- 720x400 (default 8 bit color)
360 and 720 resolutions may not work on all displays.
See documentation for the library on Read the Docs and the implementation on Read the Docs.
Note that is you need more flexibility as to resolution and color depth, see picodvi.Framebuffer later in this guide.
Page last edited July 16, 2025
Text editor powered by tinymce.