{
  "id": "mattytrentini/micropython-dotstar",
  "name": "micropython-dotstar",
  "prettyName": "micropython-dotstar",
  "description": "Dotstarrin' away in MicroPython!",
  "version": "",
  "author": "mattytrentini",
  "license": "MIT",
  "tags": [],
  "status": "VALID",
  "official": false,
  "source": "https://github.com/mattytrentini/micropython-dotstar",
  "updatedAt": "2026-08-20T07:00:32.279Z",
  "page": "https://checkmim.com/packages/mattytrentini+micropython-dotstar",
  "createdAt": "2025-05-27T04:29:26.060Z",
  "submittedBy": "oliverr",
  "install": {
    "mpremote": "mpremote mip install github:mattytrentini/micropython-dotstar",
    "mip": "import mip; mip.install(\"github:mattytrentini/micropython-dotstar\")"
  },
  "readme": "\n# MicroPython DotStar\n\nHigher level DotStar driver that presents the strip as a sequence. This is a port of the\n[Adafruit CircuitPython DotStar library]([https://github.com/adafruit/Adafruit](https://github.com/adafruit/Adafruit)CircuitPython_DotStar).\nThe primary change is to require an SPI object to be configured before creating the DotStar object. SPI\ncommunciations are used to control the DotStars. \n\n**Note:** Be aware that SPI can be implemented using hardware support or\n  purely in software. Hardware implementations allow higher rates of \n  transmission and can be desirable particularly for long strips of DotStars.\n  SPI implementation is port-dependent so see your port-specific documentation\n  for details. \n\nColors are stored as tuples by default. However, you can also use int hex syntax\nto set values similar to colors on the web. For example, ``0x100000`` (``#100000``\non the web) is equivalent to ``(0x10, 0, 0)``.\n\n``write()`` is an alias of ``show()``, matching MicroPython's ``neopixel``\ninterface and allowing code to use either driver interchangeably.\n\nIf you send a tuple with 4 values, you can control the brightness value, which appears in DotStar but not NeoPixels.\nIt should be a float. For example, (0xFF,0,0, 1.0) is the brightest red possible, (1,0,0,0.01) is the dimmest red possible.\n\n**Note:** The int hex API represents the brightness of the white pixel when\n  present by setting the RGB channels to identical values. For example, full\n  white is 0xffffff but is actually (0xff, 0xff, 0xff) in the tuple syntax. \n\n**Note:** DotStar refers to an Adafruit product based on an electronic part\n  known as APA102. 'Dotstar' and 'APA102' can be used interchangeably.\n\n# Usage Example\n\nThis example demonstrates the library with a single DotStar connected to Pins 12 and 13. This \nmatches the configuration of the [TinyPICO](http://tinpico.com). On this platform (ESP32-based)\nthis is using software SPI.\n\n```python\nfrom micropython_dotstar import DotStar\nfrom machine import SPI, Pin\nspi = SPI(sck=Pin(12), mosi=Pin(13), miso=Pin(18)) # Configure SPI - see note below\ndotstar = DotStar(spi, 1) # Just one DotStar\ndotstar[0] = (128, 0, 0) # Red\ndotstar[0] = (128, 0, 0, 0.5) # Red, half brightness\ndotstar.fill((0,0,128)) # Blue\n```\n\n**Note:** 'miso=Pin(18)' is only required due to a quirk in the current software SPI\n  implementation where all of sck, mosi and miso must be set. It's expected that this\n  limitation will be lifted in the future. In this example Pin(18) is simply unused since\n  DotStars don't send data back to the master.\n\n# Raspberry Pi Pico Example\n\nThis example demonstrates the library with a single DotStar connected to SCK Pin 10 and Tx Pin 11 on the\n[Raspberry Pi Pico](https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico).\n\n```python\nfrom micropython_dotstar import DotStar\nfrom machine import SPI\nspi = SPI(id=1, sck=10, mosi=11) # Configure SPI\ndotstar = DotStar(spi, 1)        # Setup one DotStar\ndotstar[0] = (128, 0, 0)         # Red\ndotstar[0] = (128, 0, 0, 0.5)    # Red, half brightness\ndotstar.fill((0,0,128))          # Blue\n```\n\n"
}