This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cffunction name="getDateTimeZone" returntype="string" access="public"> | |
<cfargument name="the_date" type="date" required="true"> | |
<cfset var local = {}> | |
<cftry> | |
<cfset local.timezone = ""> | |
<cfset local.obj_timezone = createObject("java", "java.util.TimeZone").getTimeZone("Europe/London")> | |
<cfset local.is_daylight_time = local.obj_timezone.inDaylightTime(arguments.the_date)> |