Circuit playground express and dotstar LEDs

I recently purchased a circuit playground express and an ADA fruit dotstar LED strip. Can anyone tell me which pin outs I connect use to connect the strip with circuit playground express?

Also can I program the thing with Makecode? The tutorials mention three wires where my strip has four. Have I purchased the wrong strip?

Thanks if you can help.

Hi Steven,

The Dotstar LEDs aren’t supported within Makecode, but Neopixels are! You can program Dotstar LEDs with the Circuit Playground Express, you will just need to use CircuitPython or Arduino.

1 Like

Hi Stephen, thanks for the response.

I got the LEDs going via CircuitPython but I can’t find documentation for the methods and properties for the adafruit_dotstar module, so I’ve started to use Arduino.

I am following this tutorial on getting started with DotStars. I’ve managed to load up the Arduino IDE and installed the required libraries and I’m trying to run the strand test sketch that is included with Adafruit_Dotstar library as an example.

Can you tell me:

  • which pins I should use for the Data and Clock wires?
  • Does the circuit playground express support SPI and if so which pins are used?
  • Do pins A4/A5 correspond to, for example, 1 and 2 in the example code below?

#define DATAPIN 4
#define CLOCKPIN 5
Adafruit_DotStar strip = Adafruit_DotStar (NUMPIXELS, DATAPIN, CLOCKPIN, DOTSTAR_BRG);

Also do I include the <SPI.h> and/or <avr/power.h> libraries? The example code mentions Gemma and Trinket but not circuit playground express.

I think it’s pretty obvious I should have purchased Neo pixels instead of dot starts, but I have what I have.

Thanks for any advice you can provide.


Hi Steven,

You can find the pinout diagram for the Circuit Playground Express here:

Any pin can be used as a digital input or output. So it doesn’t really matter what pin your choose (just not A0), they just need to match the code. If you want to connect to A4 and A5, you can call them pin 3, and 2. Just look for the “IDE” purple/green numbers on the pinout diagram.

The Circuit Playground Express supports SPI, I’m not sure how thats used in the tutorial though. The Circuit Playground Express has so much space on it you shouldn’t ever need to worry about adding libraries or not. That said, you will not need the avr/power.h libraries because those are specifically for the Gemma and Trinket. There is a bit of logic at the start of the sketch that checks to see if those boards are being used. It’s not really being used at all.

NeoPixels have more support available for sure, but once you get to coding them they are pretty similar. DotStar LEDs are MUCH more capable and refresh much faster, so you have more opportunities to make something cool with them once you overcome the starting hurdles!

Good luck with your project! Let me know if you have any further questions!

1 Like

Thanks so much for that advice, I would not have made that connection about the pin outs. That was really useful, thanks again.

1 Like

Hey I got the strand test working. Thanks for your help.

1 Like

Hey Steven,

Happy to help! This same principal applies to just about every Arduino board. If you choose to program in CircuitPython or you can just refer to the pins as A0, A1 etc and it will work!

Happy making!