Skip to content

Instantly share code, notes, and snippets.


Lucian Copeland hierophect

View GitHub Profile

SAMD low power notes

Italics: means text taken directly from the datasheet

bold: important module/feature to use

What modules are in use?

  • PM: Power Manager
hierophect /
Created Feb 23, 2021
Notes about I2C failures

Problem: as per #4046, (and maybe #4079), using board.I2C() causes a hard reboot after the first run. It doesn't show an error message or anything.

  • Test sketch:

    import board
    import busio
    i2c = board.I2C()
    #i2c = busio.I2C(board.IO5, board.IO6)

def printdevices():

hierophect / circuitpython2021.MD
Last active Jan 19, 2021
Hierophect’s Circuitpython 2021
View circuitpython2021.MD

I’ve been working on Circuitpython for about a year and a half now, contributing to the module code that helps users access chip features. 2020 was tough, but this community has been a refuge against the worst parts of the pandemic, and I feel extremely lucky to have gotten to learn and work on so many different things despite other parts of life being put on hold.

Here’s some of the stuff that happened this year:

  • I spent the early part of 2020 working on support for the STM32 H7 and i.MX chips, and the later half on modules for the ESP32-S2.
  • Some of the stuff I had hoped for got added, like deep sleep/low power features. Other stuff didn’t quite make the cut, like merging in Micropython and adding C module support (hopefully we’ll still get to that eventually).
  • My personal goal to contribute a community library for the Dynamixel servo motor went well!
  • My personal goal to add DMA support did not (I got hopelessly tied up in
import socket
PORT = 80 # The port used by the server
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((HOST, PORT))
s.sendall(b'Hello, world')
data = s.recv(1024)
hierophect /
Last active Jan 9, 2021
ESP32S2 Server
import wifi
import socketpool
# connect to wifi"YOURNETWORK", "YOURPASS")
pool = socketpool.SocketPool(
hierophect /
Created Sep 21, 2020
SD card test sketch
### SD CARD ----------------
import busio
import sdcardio
import board
import storage
import sys
import os
# Connect to the card and mount the filesystem.
spi = busio.SPI(clock=board.IO5, MOSI=board.IO4, MISO=board.IO3)
hierophect /
Created Sep 17, 2020
RGBMatrix Test
import adafruit_display_text.label
import board
import displayio
import framebufferio
import rgbmatrix
import terminalio
import time
#F4 Version
View gist:7df2c48dd49b691ca0cbd480c02d1cff
sphinx-build -b html . _build/html
Running Sphinx v3.2.1
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 0 source files that are out of date
updating environment: 0 added, 2 changed, 0 removed
reading sources... [100%] index
WARNING: autodoc: failed to import module 'dynamixel'; the following exception was raised:
Traceback (most recent call last):
File "/Users/hierophect/.virtualenvs/default/lib/python3.7/site-packages/sphinx/ext/autodoc/", line 66, in import_module
hierophect /
Created Sep 10, 2020
Testing script
import board
import busio
import displayio
import adafruit_displayio_ssd1306
i2c = busio.I2C(board.IO8, board.IO9)
display_bus = displayio.I2CDisplay(i2c, device_address=0x3c)
display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=32)
hierophect / output
Created Aug 26, 2020
Default settings of every Circuitpython module
View output
265 Lines Read
FULL BUILDS ------------------------