Skip to content

Instantly share code, notes, and snippets.

import board
import displayio
from vectorio import Rectangle, VectorShape
# Make the display context
splash = displayio.Group(max_size=10)
board.DISPLAY.show(splash)
# Make a background color fill
color_bitmap = displayio.Bitmap(320, 240, 1)
# This test will initialize the display using displayio and draw a solid white
# background, a smaller black rectangle, and some white text.
# Code explanation: https://learn.adafruit.com/monochrome-oled-breakouts/circuitpython-usage
import time
import board
import displayio
import terminalio
import time
#import pyfirmata
#from pyfirmata import Arduino, util
from time import sleep
serialPort = "COM3"
time.sleep(1)
totalseconds=0
def totaltime():
#code for Metro M4 with custom UF2 to make regular 32x16 RGB Matrix work
import board
import displayio
import framebufferio
import rgbmatrix
import adafruit_imageload
#displayio.release_displays()
# don't get hung up on this code
import gc
import time
import displayio
import terminalio
import adafruit_sdcard
import busio
import digitalio
import board
import storage
import json
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 15 columns, instead of 3 in line 5.
Email Id,Prefix,Name,Birth Date,Phone Number,Additional Email Id,Address,Zip Code,City,State,Country,Year,Time,Link,Text
[email protected],Mr.,Douglas Hall,01-06-1984,+44(0)121 496 0423,[email protected],"66722 Tina Lights
West Courtneyside, ME 65653",79063,Hilltown,Alaska,Barbados,1993,15:36:34,http://www.cruz.com/,central
[email protected],Ms.,Joseph Cox,08-04-1997,01214960046,[email protected],"764 Robinson Points
West Katie, OH 37555",26557,Ashleyberg,Colorado,Ukraine,2001,21:57:10,https://www.wood.net/,feel
[email protected],Mr.,Eric Buck,26-10-1986,(0113) 496 0646,[email protected],"6915 Shawn Trail
Port Kendraview, TX 27836",43259,Sawyerberg,South Dakota,Estonia,1989,12:57:16,http://bell.net/,interest
[email protected],Dr.,Timothy Williams,30-06-1996,0114 496 0548,[email protected],"12093 Morales Valleys Suite 268
Samanthahaven, VA 29813",58509,Lawsonfurt,Alaska,Denmark,1976,11:01:02,https://lucero.net/,tend
[email protected],Dr.,Lisa
import supervisor
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, brightness=0.2)
def convert_color_str(color_str):
color_str = color_str.replace("(", "")
# Itsy Bitsy M0 Express IO demo
# Welcome to CircuitPython 2.2 :)
import board
import gc
import time
from digitalio import DigitalInOut, Direction, Pull
from analogio import AnalogIn
import audioio
import touchio
# This example runs on PyPortal, or any Circuit Python device with a built-in screen that is at least 320x240 pixels.
# It will use adafruit_bitmap_font to load a font and fill a bitmap with pixels matching glyphs from a given String
from adafruit_bitmap_font import bitmap_font # pylint: disable=wrong-import-position
import displayio
import board
def clamp(x):
return max(0, min(x, 255))