Skip to content

Instantly share code, notes, and snippets.

@tusing
tusing / Zeal60_UnderglowGuidePublic.md
Last active January 23, 2024 18:25
A guide detailing how to enable underglow on the Zeal60 with WS2812 LEDs.

RGB Underglow Strip on the Zeal60: A Guide

A. Connecting the strip

You might find the full PCB image helpful. Ignore the red boxes!

  1. Connect V+ to the receiving end of the thermistor labeled F1; connect GND to the board's GND pin. (Avoid connecting +V to the board's +5V pin - you will likely overload the thermistor, and you will limit your maximum brightness.)
"""NavigationSensors - designed to parse data from devices such as the Microsoft
Kinect and ultrasonic sensors, in order to translate the data into
intuitively acceptable input (such as haptic feedback) for blind individuals.
The ideal use case is as such:
1) We have a vest with haptic feedback motors. We have a Kinect and an
ultrasonic sensor.
2) We parse data from the Kinect into subdivided segments - one
for every motor. For example, a vest with 4 motors would mean
to subdivide our image into 4 squares (likely in a 2x2 formation).
#define RGBLIGHT_CURRENT_PER_STRIP_LIGHT 60
#define RGBLIGHT_NUM_STRIP_LIGHTS 16
#define MAX_STRIP_CURRENT 400
void adjust_current(bool rgbw) {
// Pass in rgbw=True if you have rgbw strips.
float max_rgbw_val = (255 * (3 + rgbw)) * ((MAX_STRIP_CURRENT /
RGBLIGHT_NUM_STRIP_LIGHTS) / RGBLIGHT_CURRENT_PER_STRIP_LIGHT);
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
"""CameraParser - designed to parse data from a camera such as the Microsoft
Kinect, in order to translate the data into intuitively acceptable input,
such as haptic feedback, for blind individuals.
The ideal use case is as such:
1) We have a vest with haptic feedback motors. We have a Kinect, or some
camera capable of giving us meaningful data for blind individuals, e.g.
depth.
2) We parse data from the Kinect into subdivided segments - one
for every motor. For example, a vest with 4 motors would mean
import freenect
import numpy as np
from threading import Thread, RLock
class KinectParser:
def __init__(self, x, y, function=False):
if function is False:
self.function = self.decayingAverage
else:
@tusing
tusing / barebones.py
Created December 10, 2016 00:54
project stuff
import freenect
import cv2
import numpy as np
import sys, getopt
import math
import RPi.GPIO as GPIO
import time
import atexit
def main(argv):
@tusing
tusing / plot.py
Created December 2, 2016 06:57
plotting stuff for project-nanotech
import glob
import csv
import re
import collections
import ast
import numpy as np
from collections import defaultdict
import plotly.plotly as py
import plotly.graph_objs as go
#######################################################
#### NOW AT A GITHUB REPO ####
#### https://github.com/tusing/unicorn_phat ####
#######################################################
#!/usr/bin/env python
# Display a list of user-defined color bars;
# fill the remaining area with sparkles.
# Designed for the Unicorn pHAT.
#!/usr/bin/env python
# Display a list of user-defined color bars;
# fill the remaining area with sparkles.
# Designed for the Unicorn pHAT.
# By tusing.
import unicornhat as unicorn
from random import randint
@tusing
tusing / CHECKED_COMMENTS.txt
Last active July 28, 2016 22:45
FanfictionBot Comment Backup:
d5am68b
d48mjja
d459cpq
d4qd9w8
d4pb6u9
d4arlnf
d5e76ux
d4p17cl
d4ouwg8
d44ot8g