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. |
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? |
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 time | |
from umqtt.robust import MQTTClient | |
import os | |
import sys | |
from machine import Pin | |
ADAFRUIT_IO_URL = b'io.adafruit.com' | |
ADAFRUIT_USERNAME = b'<insert username here>' | |
ADAFRUIT_IO_KEY = b'<insert Adafruit IO key here>' |
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 pimoroni_envirowing import gas | |
from pimoroni_envirowing import screen | |
from gauge import Gauge | |
import displayio | |
import terminalio | |
import busio |