Skip to content

Instantly share code, notes, and snippets.

View tomverbeure's full-sized avatar

Tom Verbeure tomverbeure

View GitHub Profile
@tomverbeure
tomverbeure / led_sphere_test.py
Created June 13, 2022 01:50
Control LED sphere with MicroPython
import array, time
from machine import Pin
import rp2
# Configure the number of WS2812 LEDs, pins and brightness.
NUM_LEDS = 20 * 21
PIN_NUM = 0
brightness = 0.1
LED_PIN = 25
#! /usr/bin/env python3
import numpy as np
import matplotlib
from matplotlib import pyplot as plt
from filter_lib import *
from scipy import signal
@tomverbeure
tomverbeure / fft_plots.py
Created February 21, 2021 22:00
Code for dsp.stackexchange.com question
#! /usr/bin/env python3
import sys
import numpy as np
import matplotlib
import scipy
from matplotlib import pyplot as plt
import math
@tomverbeure
tomverbeure / gist:c73a7bac5468b306798a524138bede40
Created August 19, 2018 00:22
Reset some signals in a bundle
case class MyBundle(config: MyConfig) extends Bundle {
val valid = Bool
val data = UInt(32 bits)
}
...
val bundle = MyBundle(config)
bundle.valid := valid && ready