EasyManuals Logo

Adafruit Feather M4 Express User Manual

Adafruit Feather M4 Express
178 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #134 background imageLoading...
Page #134 background image
CircuitPython DotStar
DotStars use two wires, unlike NeoPixel's one wire. They're very similar but you can write to DotStars much faster with
hardware SPI
and
they have a faster PWM cycle so they are better for light painting.
Any pins can be used but if the two pins can form a hardware SPI port, the library will automatically switch over to
hardware SPI. If you use hardware SPI then you'll get 4 MHz clock rate (that would mean updating a 64 pixel strand in
about 500uS - that's 0.0005 seconds). If you use non-hardware SPI pins you'll drop down to about 3KHz, 1000 times as
slow!
You can drive 300 DotStar LEDs with brightness control (set brightness=1.0 in object creation) and 1000 LEDs
without. That's because to adjust the brightness we have to dynamically recreate the data-stream each write.
You'll need the adafruit_dotstar.mpy library if you don't already have it in your /lib folder! You can get it from the
CircuitPython Library Bundle (https://adafru.it/y8E). If you need help installing the library, check out the CircuitPython
Libraries page (https://adafru.it/ABU).
Wire It Up
You'll need to solder up your DotStars first. Verify your connection is on the DATA INPUT or DI and CLOCK INPUT or CI
side. Plugging into the DATA OUT/DO or CLOCK OUT/CO side is a common mistake! The connections are labeled and
some formats have arrows to indicate the direction the data must flow. Always verify your wiring with a visual
inspection, as the order of the connections can differ from strip to strip!
For powering the pixels from the board, the 3.3V regulator output can handle about 500mA peak which is about 50
pixels with 'average' use. If you want really bright lights and a lot of pixels, we recommend powering direct from an
external power source.
On Gemma M0 and Circuit Playground Express this is the Vout pad - that pad has direct power from USB or the
battery, depending on which is higher voltage.
On Trinket M0, Feather M0 Express, Feather M4 Express, ItsyBitsy M0 Express and ItsyBitsy M4 Express the USB
or BAT pins will give you direct power from the USB port or battery.
On Metro M0 Express and Metro M4 Express, use the 5V pin regardless of whether it's powered via USB or the
DC jack.
If the power to the DotStars is greater than 5.5V you may have some difficulty driving some strips, in which case you
may need to lower the voltage to 4.5-5V or use a level shifter.
Do not use the VIN pin directly on Metro M0 Express or Metro M4 Express! The voltage can reach 9V and this
can destroy your DotStars!
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 139 of 183

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Adafruit Feather M4 Express and is the answer not in the manual?

Adafruit Feather M4 Express Specifications

General IconGeneral
BrandAdafruit
ModelFeather M4 Express
CategoryMicrocontrollers
LanguageEnglish

Related product manuals