I want to have the buttons on my Pimoroni Badger 2040 change the modes of the display. The challenge is gracefully removing the current contents of the display before rendering the selected mode.
Right now my kludgy solution is a try/except that takes the sledgehammer approach and tries to remove all the text groups that could be on the screen.
Code: Select all
try:
g.remove(q_group)
g.remove(a_group)
except:
print('Groups not attached.')