adafruit / Adafruit_CircuitPython_PyBadger

Badge-focused CircuitPython helper library for PyBadge, PyBadge LC, PyGamer and CLUE
MIT License
21 stars 26 forks source link

adding support for PyPortal and a simpletest example. #33

Closed FoamyGuy closed 4 years ago

FoamyGuy commented 4 years ago

Someone from discord was trying to use the pybadger library with a pyportal recently and it didn't work because it wasn't meant to be supported by this library.

I was able to add support for PyPortal as well as created and tested a modified simpletest example that works on the PyPortal with touchscreen to advance between examples instead of physical buttons.

The PyPortal has no physical buttons like the rest of the devices this library supports.

fede2cr commented 4 years ago

Tested the branch on my pyportal with circuitpython 5.4 beta, and it works excellent. I even tried the dimmer from the simple example and it works fine.

Thanks you so much for you help with this.

FoamyGuy commented 4 years ago

play_file and light were actually mostly working already they just needed to not get set to _unsupported and tweak the pin for the light sensor.

The latest commits fix those and I also added a new example blinka bmp file that fits the PyPortal screen a bit better.

Thank you jerry and fede2cr for the feedback.

FoamyGuy commented 4 years ago

34 should be taken in favor of this. It contains the PyPortal support and example as well as some refactoring to it that took place while working on #34.

If it's preferred to have them separated let me know and we can re-open this one.