Skip to content

Instantly share code, notes, and snippets.

/*
DMX controller to NeoPixel strips
John Park for Adafruit Industries 2024
*/
#include <Conceptinetics.h>
#include <Adafruit_NeoPixel.h>
// User adjust these for the number of strips, pins, pixels per strip, and color formats:
#define NUM_STRIPS 3
#include <Conceptinetics.h>
#include <Adafruit_NeoPixel.h>
#define NUMSTRIPS 2
#define STRIP1_PIN A0
#define STRIP2_PIN A2
#define STRIP1_NUMPIXELS 30
#define STRIP2_NUMPIXELS 20
Adafruit_NeoPixel strip1(STRIP1_NUMPIXELS, STRIP1_PIN, NEO_GRB + NEO_KHZ800); // set proper color order here, typical is 'GRB', the Adafruit 'heart', 'ball', 'sphere' strips are BGR
@jedgarpark
jedgarpark / gist:fa09a0e18a625bd332e5fa55139bbd45
Created November 21, 2024 19:00
DMX_receive_neopixel.ino
#include <Conceptinetics.h>
#include <Adafruit_NeoPixel.h>
#define PIN 12
#define NUMPIXELS 16
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
//
// The slave device will use a block of 10 channels counting from
// its start address.
//
# SPDX-FileCopyrightText: Copyright (c) 2024 John Park for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
USB C PD power supply w HUSB238
pick voltages and then set them, measures high side current with INA219
"""
import time
import board
import displayio
# SPDX-FileCopyrightText: Copyright (c) 2023 Scott Shawcroft for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2024 Tod Kurt
# SPDX-FileCopyrightText: Copyright (c) 2024 John Park
# SPDX-License-Identifier: Unlicense
#
# Forward MIDI from device on USB Host port to computer via USB MIDI
# and 5-pin serial MIDI via MIDI Feather Wing or similar MIDI output.
# Suppots hot-plug of the device on the USB Host port.
# SPDX-FileCopyrightText: 2024 John Park for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
Drum Track Sequencer
Feather RP2040, Motor FeatherWing, stepper motor,
four reflection sensors (either MIDI out or synthio w amp)
"""
# SPDX-FileCopyrightText: Copyright (c) 2023 Scott Shawcroft for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2024 Tod Kurt
# SPDX-FileCopyrightText: Copyright (c) 2024 John Park
# SPDX-License-Identifier: Unlicense
#
# Forward MIDI from device on USB Host port to computer via USB MIDI
# and 5-pin serial MIDI via MIDI Feather Wing or similar MIDI output.
# Suppots hot-plug of the device on the USB Host port.
# jpeg loader slideshow
# based on color summarizer by @todbot / Tod Kurt
#https://gist.github.com/todbot/0bf32a6bf8dd21983a32bafc173b3223#file-code_color_palette_finder-py
import time
import board
import displayio
import jpegio
from adafruit_hx8357 import HX8357
import gc
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2023 Tod Kurt
#
# SPDX-License-Identifier: Unlicense
"""Demonstrate MicroOSC library in CircuitPython, assumes native `wifi` support"""
import time
import os
# SPDX-FileCopyrightText: Copyright (c) 2023 john park for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# simple point-and-shoot camera example
# No bells! Zero whistles!
import time
import adafruit_pycamera
pycam = adafruit_pycamera.PyCamera()