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 |
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 | |
import usb_midi | |
import adafruit_midi | |
from adafruit_midi.note_on import NoteOn | |
from adafruit_midi.note_off import NoteOff | |
import random | |
USB_MIDI_channel = 1 # pick your USB MIDI out channel here, 1-16 |
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 board | |
import digitalio | |
import gamepad | |
import time | |
import usb_hid | |
from adafruit_hid.keyboard import Keyboard | |
from adafruit_hid.keycode import Keycode | |
kbd = Keyboard(usb_hid.devices) |
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 board | |
import busio | |
import usb_hid | |
from adafruit_bus_device.i2c_device import I2CDevice | |
import adafruit_dotstar | |
from adafruit_hid.keyboard import Keyboard |
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 neopixel | |
try: | |
import urandom as random | |
except ImportError: | |
import random | |
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
# Drive NeoPixels on the NeoPixels Block on Crickit for | |
# Circuit Playground Express | |
import time | |
import neopixel | |
import board | |
from adafruit_circuitplayground.express import cpx | |
from math import floor | |
num_pixels = 45 # Number of pixels driven from Crickit NeoPixel terminal |
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
#include "DHT.h" | |
#include "esp_wifi.h" | |
#include <WiFi.h> | |
#include <ArduinoJson.h> | |
#include <HTTPClient.h> | |
//move to secrets | |
const char * networkName = "XXX"; | |
const char * networkPswd = "XXX"; | |
String AIOKey = "XXX"; |
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
#include "config.h" | |
// ToDO | |
// There's a power bug that stops the screen going to sleep if the USB's been unpowered | |
// This also doesn't update the steps if the screen's been off UNLESS there's one more step (interrrupt) | |
// Get weather from wifi IF it's being charged | |
// Make it last a day comfortably of full use | |
// Save steps per day between power downs | |
// upload steps somewhere? Google Sheets? | |
// no need to do processing (such as time updates) if the screen is off. |