Reference Page:

Download Mu Editor from https://codewith.mu

Install CircuitPython on the CircuitPlayground device: https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython

Procedure for keeping copies of your code on your computer:

  1. Create a folder on your computer, one for each code you write.
  2. Save from Mu onto your device, which also runs the code.
  3. Open the CIRCUITPY drive on your computer.
  4. Copy code.py from the device to your code folder. Keep both.

This keeps a local copy on your computer that you can go back to later.

About the CircuitPlayground Express device: https://www.adafruit.com/product/3333

CircuitPlayground Express pinouts: https://cdn-learn.adafruit.com/assets/assets/000/049/780/original/Adafruit_Circuit_Playground_Express_Pinout.pdf

Libraries:

  1. make a lib folder on the CIRCUITPY device.
  2. Get libraries from here: https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-libraries
  3. Copy neopixel.mpy into lib folder on device.

Create the red_led object:

  • red_led = digitalio.DigitalInOut(board.D13)
  • red_led.direction = digitalio.Direction.OUTPUT

Create the pix object to access the neopixels:

  • num_leds = 10
  • pix = neopixel.NeoPixel(board.D8, num_leds, brightness=0.1, auto_write=False)

Example: neopixel_rotate.py (change the datapin to board.D8)

Powering External Neopixels:

  1. Use only a 5V supply
  2. Each A of power supply capability can power 10 Neopixels = 10 pix/A.
  3. Do not power the external neopixels from the CircuitPlayground device.
  4. Power off before making or breaking connections.
  5. Connect Ground (GND) to three things: (use a penny as star point ground)
    1. CircuitPlaground
    2. Power Supply
    3. Neopixels
  6. Connect in this order, always, to prevent destroying the Neopixels
    1. Ground
    2. +5V Power
    3. Data
  7. Disconnect in this order, always to prevent destroying the Neopixels.
    1. Data
    2. +5V Power
    3. Ground

Note: If you buy RGBW pixels, you need to send 4 arguments per pixel. See information here: https://learn.adafruit.com/circuitpython-essentials/circuitpython-neopixel#neopixel-rgbw-12-12