Libraries

Once you've gotten CircuitPython onto your CLUE or Circuit Playground Bluefruit (CPB) board, it's time to add some libraries. You can follow this guide page for the basics of downloading and transferring libraries to the board.

Libraries for Very Simple Game

No libraries are required from the bundle for this version.

The random library is used but this library is built into the CircuitPython interpreter.

Libraries for Simple Game

From the library bundle you downloaded in that guide page, transfer the following libraries onto the CLUE board's /lib directory:

  • adafruit_ble
  • adafruit_display_text
  • adafruit_imageload
  • neopixel.mpy

The adafruit_imageload and neopixel.mpy aren't used by this version but are needed later for the Advanced game...

The adafruit_ble library must be from a bundle later or equal to 20200825.

Libraries for Advanced Game for CLUE

From the library bundle you downloaded in that guide page, transfer the following libraries onto the CLUE board's /lib directory:

  • adafruit_ble
  • adafruit_display_text
  • adafruit_imageload
  • neopixel.mpy

Libraries for Advanced Game for Circuit Playground Bluefruit with TFT Gizmo

From the library bundle you downloaded in that guide page, transfer the following libraries onto the CPB board's /lib directory:

  • adafruit_ble
  • adafruit_display_text
  • adafruit_imageload
  • adafruit_gizmo
  • neopixel.mpy
  • adafruit_st7789.mpy

Libraries for Advanced Game for Circuit Playground Bluefruit only

From the library bundle you downloaded in that guide page, transfer the following libraries onto the CPB board's /lib directory:

  • adafruit_ble
  • adafruit_display_text
  • neopixel.mpy

The adafruit_display_text is not actively used but is needed due to how the implementation uses and imports libraries.

Development Testing

During development, the application was tested on the CLUE and CPB boards using CircuitPython 5.3.1 with libraries from the adafruit-circuitpython-bundle-5.x-mpy-20200825.zip bundle. It should work on subsequent versions, the latest version is recommended for the CLUE and CPB.

This guide was first published on Sep 02, 2020. It was last updated on Sep 02, 2020.

This page (CircuitPython) was last updated on Nov 03, 2021.

Text editor powered by tinymce.