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 network | |
import urequests | |
import json | |
import time | |
from machine import Pin | |
from secrets import secrets | |
import machine | |
import neopixel | |
print("starting connection") |
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 | |
import touchio | |
from digitalio import DigitalInOut, Direction, Pull | |
import usb_hid | |
from adafruit_hid.keyboard import Keyboard | |
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS | |
from adafruit_hid.keycode import Keycode | |
touch_pad_z = board.GP2 |
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
#Note this is in Micropython not circuit python as circuit python doesn't give enough control over the state machines. | |
from machine import Pin, ADC | |
import array | |
from rp2 import PIO, StateMachine, asm_pio | |
import uctypes | |
from uctypes import BF_POS, BF_LEN, UINT32, BFUINT32, struct | |
from math import floor, ceil | |
from time import sleep |
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
from machine import Pin, ADC | |
import array | |
from rp2 import PIO, StateMachine, asm_pio | |
import uctypes | |
from uctypes import BF_POS, BF_LEN, UINT32, BFUINT32, struct | |
from math import floor, ceil | |
from time import sleep | |
import _thread | |
import gc |
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
from machine import Pin, ADC | |
import array | |
from rp2 import PIO, StateMachine, asm_pio | |
import uctypes | |
from uctypes import BF_POS, BF_LEN, UINT32, BFUINT32, struct | |
from math import floor, ceil | |
from time import sleep | |
import _thread | |
import gc |
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
# Write your code here :-) | |
import time | |
import digitalio | |
import board | |
import touchio | |
on_off = True | |
led = digitalio.DigitalInOut(board.GP0) | |
led.direction = digitalio.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
import board | |
import neopixel | |
from adafruit_led_animation.animation.rainbow import Rainbow | |
from adafruit_led_animation.animation import Animation | |
from adafruit_led_animation.color import BLACK, RED, GREEN, YELLOW | |
from adafruit_led_animation.color import calculate_intensity | |
from random import randrange, randint | |
threshold = 0.1 | |
step = 0.1 |
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 rp2 | |
import time | |
from machine import Pin | |
import array | |
import math | |
import _thread | |
import random | |
import time | |
import rp2040_pio_dma | |
import uctypes |
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
# Write your code here :-) | |
"""CircuitPython Essentials Digital In Out example""" | |
import time | |
import board | |
from digitalio import DigitalInOut, Direction | |
import touchio | |
# LED setup. | |
LED_pins = [board.GP0, board.GP1, board.GP2, board.GP3, board.GP4, board.GP5, board.GP6, |
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 | |
import busio | |
from simpleio import map_range | |
from analogio import AnalogIn | |
from digitalio import DigitalInOut, Direction | |
import usb_midi | |
import adafruit_midi # MIDI protocol encoder/decoder library | |
from adafruit_midi.control_change import ControlChange | |
from adafruit_midi.note_on import NoteOn |