- StackyPi or a board with GPIO design compatible with StackyPi
Product | MicroPython | CircuitPython |
---|---|---|
BLINKT! | Not tested | OK |
Unicorn HAT | Not tested | OK |
Scroll pHAT HD | OK | No (*1) |
Nokia5110 / PCD8544 Module | OK | No (*1) |
(*1) Can not detect device with StackyPi GPIO design (maybe).
- https://shop.pimoroni.com/products/blinkt
- https://github.com/pimoroni/blinkt
- https://pinout.xyz/pinout/blinkt
It can be controlled with the adafruit_dotstar library.
import board
import adafruit_dotstar as dotstar
dots = dotstar.DotStar(board.A0, board.A1, 30, brightness=0.02)
dots[0] = (255, 255, 255)
dots[7] = (255, 255, 255)
dots.show()
- https://shop.pimoroni.com/products/unicorn-hat
- https://github.com/pimoroni/unicorn-hat
- https://pinout.xyz/pinout/unicorn_hat
It can be controlled with the neopixel library.
You can use example from https://learn.adafruit.com/circuitpython-essentials/circuitpython-neopixel and set board.A2 to pixel_pin and set 64 to num_pixels.
import neopixel
pixel_pin = board.A1
num_pixels = 64
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.03, auto_write=False)
- https://shop.pimoroni.com/products/scroll-phat-hd
- https://github.com/pimoroni/scroll-phat-hd
- https://pinout.xyz/pinout/scroll_phat_hd
It can be controlled with the adafruit's is31fl3731 library.
https://github.com/adafruit/micropython-adafruit-is31fl3731
import time
from machine import I2C, Pin
import is31fl3731
i2c = I2C(0, scl=Pin(21), sda=Pin(20))
display = is31fl3731.Matrix(i2c)
def scrollphathd_pixel(x, y, b):
py = 6 - y
if (x < 9):
px = 8 - x
else:
px = x - 9
py = y + 8
display.pixel(py, px, b)
brightness = 10
scrollphathd_pixel( 0, 0, brightness)
scrollphathd_pixel(16, 0, brightness)
scrollphathd_pixel( 0, 6, brightness)
scrollphathd_pixel(16, 6, brightness)
You can use example from https://github.com/Akkiesoft/akkiesoft-pico/blob/main/MicroPython/test-pico-pcd8544/test-pico-pcd8544.py and change these parameters and use SoftSPI instead of SPI.
from machine import Pin, SoftSPI
cs = Pin(9)
dc = Pin(8)
rst = Pin(27)
spi = SoftSPI(sck=Pin(7), mosi=Pin(28), miso=dc)
print(spi)
lcd = pcd8544_fb.PCD8544_FB(spi, cs, dc, rst)