Skip to content

Instantly share code, notes, and snippets.

View joeycastillo's full-sized avatar

Jose Castillo joeycastillo

  • New York, NY
View GitHub Profile
@joeycastillo
joeycastillo / code.py
Created March 5, 2025 21:35
Gesture based music control using Adafruit Clue
import time
import adafruit_ble
from adafruit_ble.advertising.standard import SolicitServicesAdvertisement
from adafruit_ble_apple_media import AppleMediaService
from adafruit_ble_apple_media import UnsupportedCommand
from adafruit_clue import clue
# Set up Bluetooth
radio = adafruit_ble.BLERadio()
radio.name = "RENAME ME"
@joeycastillo
joeycastillo / parsemap.py
Created December 4, 2024 18:55
Convert marimapper 3D map of LEDs into Pixelblaze-compatible array of points
# open csv file and convert to JSON
import csv, json
with open('led_map_3d.csv', 'r') as f:
reader = csv.reader(f)
data = list(reader)
# remove first row of csv file (header)
data = data[1:]
output = []
from machine import Pin, I2C
import time
# Simple "Sensor Watch" SAO example.
# You can paste this at the beginning of your main.py, and then run the rest of your loop normally.
# For a more advanced example: https://gist.github.com/joeycastillo/a617c949258fae4e5e333eaeb06b102a
# right side I2C, replace with i2c0 for left side
display_i2c = i2c1
from machine import Pin, I2C
import time
display_i2c = i2c1 # right side I2C, replace with i2c0 for left side
CHARS = (
0b00000000, # [space]
0b00000000, # !
0b01001000, # "
0b11001100, # # (°)
@joeycastillo
joeycastillo / README.md
Last active January 4, 2024 21:55
Techno-Pessimist Tech Club design files
@joeycastillo
joeycastillo / OSO-SWAT-B1-B_Cu.gbr
Last active August 3, 2023 16:34
Sensor Watch gerbers - second export
%TF.GenerationSoftware,KiCad,Pcbnew,7.0.1-0*%
%TF.CreationDate,2023-08-03T08:03:27-04:00*%
%TF.ProjectId,OSO-SWAT-B1,4f534f2d-5357-4415-942d-42312e6b6963,03*%
%TF.SameCoordinates,Original*%
%TF.FileFunction,Copper,L2,Bot*%
%TF.FilePolarity,Positive*%
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 7.0.1-0) date 2023-08-03 08:03:27*
%MOMM*%
@joeycastillo
joeycastillo / bookcase.scad
Created June 30, 2023 21:01
VERY WORK-IN-PROGRESS case for Open Book Abridged Edition
// Render front side
front = true;
// Render back side
back = true;
// level of detail
level_of_detail = 60;
// The thickness of the PCB as fabricated
@joeycastillo
joeycastillo / secrets.py
Created April 27, 2023 00:12
Typical secrets.py file for a CircuitPython project
secrets = {
"ssid" : "YOUR_WIFI_NETWORK",
"password" : "YOUR_WIFI_PASSWORD",
"aio_username" : "ADAFRUIT_IO_USERNAME",
"aio_key" : "ADAFRUIT_IO_KEY",
"timezone" : "America/Chicago", # http://worldtimeapi.org/timezones
}
@joeycastillo
joeycastillo / code.py
Created April 26, 2023 23:29
Low power Adafruit IO data logger with always-on LCD display
import board
import digitalio
import rtc
import time
import alarm
import ssl
import wifi
import socketpool
import adafruit_requests

Steps for replicating Learn Guide User Page save error

  1. Create a new user Page.
  2. Create a new code block and paste the contents of step1.py into it.
  3. Repeat for files step2.py through step5.py.

In three tests, twice I got the error trying to input step3.py, and once I got through step3 but started to get the error on step4.py.