diff --git a/adafruit_pyportal/graphics.py b/adafruit_pyportal/graphics.py index 3a24e93..5b99016 100755 --- a/adafruit_pyportal/graphics.py +++ b/adafruit_pyportal/graphics.py @@ -62,7 +62,7 @@ def qrcode(self, qr_data, *, qr_size=1, x=0, y=0, hide_background=False): y=y, ) if hide_background: - self.display.show(self._qr_group) + self.display.root_group = self._qr_group self._qr_only = hide_background # pylint: enable=arguments-differ @@ -71,7 +71,7 @@ def hide_QR(self): # pylint: disable=invalid-name """Clear any QR codes that are currently on the screen""" if self._qr_only: - self.display.show(self.splash) + self.display.root_group = self.splash else: try: self._qr_group.pop() diff --git a/examples/pyportal_simpletest.py b/examples/pyportal_simpletest.py index 18b0017..b98fbcf 100644 --- a/examples/pyportal_simpletest.py +++ b/examples/pyportal_simpletest.py @@ -5,8 +5,10 @@ # NOTE: Make sure you've created your secrets.py file before running this example # https://learn.adafruit.com/adafruit-pyportal/internet-connect#whats-a-secrets-file-17-2 import board +from displayio import CIRCUITPYTHON_TERMINAL from adafruit_pyportal import PyPortal + # Set a data source URL TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html" @@ -14,7 +16,7 @@ pyportal = PyPortal(url=TEXT_URL, status_neopixel=board.NEOPIXEL) # Set display to show REPL -board.DISPLAY.show(None) +board.DISPLAY.root_group = CIRCUITPYTHON_TERMINAL # Go get that data print("Fetching text from", TEXT_URL)