Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Horne recantha

View GitHub Profile
View pico_360_demo_code.py
import time
import board
from digitalio import DigitalInOut, Direction, Pull
import pwmio
from analogio import AnalogIn
led1 = pwmio.PWMOut(board.GP7, frequency=5000, duty_cycle=0)
led2 = DigitalInOut(board.GP8)
led2.direction = Direction.OUTPUT
View thermal_camera_with_ILI9341_screen.py
# AMG8833 thermal camera on an ILI9341 320x240 screen
# Michael Horne, based on Jan Goolsbey's code for Adafruit
# https://learn.adafruit.com/pygamer-thermal-camera-amg8833?view=all
import time
import board
import displayio
import busio
from simpleio import map_range
from adafruit_display_text.label import Label
View code.py
# This is the code from: https://learn.adafruit.com/adafruit-max98357-i2s-class-d-mono-amp/circuitpython-wiring-test
# On a Raspberry Pi Pico, WHICH DOES NOT HAVE I2S... Distortion aside, this sounds correct.
# How is that possible?
import time
import array
import math
import audiocore
import board
import audiobusio
@recantha
recantha / gist:01723d8ad894b54a8b17edd7ce90f8b1
Last active May 3, 2021
Conway's Game of Life for the Raspberry Pi Pico with Pimoroni Pico Scroll pack
View gist:01723d8ad894b54a8b17edd7ce90f8b1
# Conway's Game of Life
# Converted by Michael Horne from Steve Baines' Pico Unicorn pack example (Thanks to Tony Goodhew for spotting!)
# https://forums.pimoroni.com/t/pico-unicorn-pack-not-working-in-micropython/15997/5
# 14 Feb 2021 - Pimoroni UF2 0.0.7
import picoscroll as pico_addon
import random
import time
pico_addon.init()