Copyright 2018 Moddable Tech, Inc.
Revised: September 10, 2024
The DotStar display controller drives strings of color LED lights. The displays are available from Adafruit in various lengths and configurations
These LEDs are not strictly a display, but they can be seen as one row of a display. There are options to purchase them in a organized in a rectangular grid, which is like a display.
The dotstar example works with a 144 LED DotStar string. It scans through an image one row at a time to update the pixels on the DotStar string.
To add the DotStar driver to a project, include its manifest:
The DotStar driver requires 16-bit color (rgb565le) pixels.
mcconfig -m -p esp -f rgb565le
In the defines object, the optional brightness property may be set, where 255 is brightest and 0 is off.
"defines": {
"dotstar": {
"brightness": 64
}
}The defines object must contain the spi_port.
"defines": {
"dotstar": {
/* other properties here */
"spi_port": "#HSPI"
}
}The hz property, when present, specifies the SPI bus speed. The default value is 20,000,000 Hz which is near the maximum SPI speed supported by the controllers.