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:
- Create a folder on your computer, one for each code you write.
- Save from Mu onto your device, which also runs the code.
- Open the CIRCUITPY drive on your computer.
- 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
- make a lib folder on the CIRCUITPY device.
- Get libraries from here: https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-libraries
- 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:
- Use only a 5V supply
- Each A of power supply capability can power 10 Neopixels = 10 pix/A.
- Do not power the external neopixels from the CircuitPlayground device.
- Power off before making or breaking connections.
- Connect Ground (GND) to three things: (use a penny as star point ground)
- Power Supply
- Connect in this order, always, to prevent destroying the Neopixels
- +5V Power
- Disconnect in this order, always to prevent destroying the Neopixels.
- +5V Power
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