I usually use C/C++ but would like to give CircuitPython a try.
I have managed to get the Python Keyboard and red LED example working, but when I try to use the DotStar, I get the following error message at the line:
led = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1)
Any help please?
----
Traceback (most recent call last):
File "main.py", line 7, in <module>
File "adafruit_dotstar.py", line 128, in __init__
TypeError: function missing 1 required positional arguments
---
Example is from .pdf guide
---
Code: Select all
import time
import board
# For Trinket M0, Gemma M0, ItsyBitsy M0 Express, and ItsyBitsy M4 Express
import adafruit_dotstar
led = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1)
led.brightness = 0.3
while True:
led[0] = (255, 0, 0)
time.sleep(0.5)
led[0] = (0, 255, 0)
time.sleep(0.5)
led[0] = (0, 0, 255)
time.sleep(0.5)