Skip to content

Instantly share code, notes, and snippets.

View jboone's full-sized avatar

Jared Boone jboone

View GitHub Profile
@jboone
jboone / goertzel.py
Last active March 16, 2022 21:50
Goertzel-based DTMF detection.
#!/usr/bin/env python3
import sys
import wave
import numpy
import scipy.signal
def detect_tone(x, f, fs, step_size):
# Apply Goertzel algorithm
--- LPC43xx.svd.orig 2017-08-03 20:37:12.501824574 -0700
+++ LPC43xx.svd 2017-08-03 22:25:24.933731557 -0700
@@ -142,82 +142,82 @@
<enumeratedValues>
<name>ENUM</name>
<enumeratedValue>
- <name>RISING_EDGES_ON_INPU</name>
+ <name>INPUT_0_RISING_EDGE</name>
<description>Rising edges on input 0.</description>
<value>0x0</value>
@jboone
jboone / afsk_demod.grc
Created September 7, 2016 06:07
GNU Radio 3.7.10 graph to demonstrate AFSK demodulation.
<?xml version='1.0' encoding='utf-8'?>
<?grc format='1' created='3.7.10'?>
<flow_graph>
<timestamp>Sun Sep 4 08:56:11 2016</timestamp>
<block>
<key>options</key>
<param>
<key>author</key>
<value></value>
</param>
@jboone
jboone / real_downconvert.py
Created January 15, 2016 18:09
Downconverting band-limited real-valued signal is a mess I don't have time to clean up. :-)
#!/usr/bin/env python
import numpy
import scipy.fftpack
import matplotlib.pyplot as plt
def plot_time_domain_of(items):
for t, samples, label in items:
plt.plot(t, samples, label=label)
@jboone
jboone / packets.txt
Created December 3, 2015 06:00
Packets.
0110011001100110 0010101010100101010101010101001010011001010101011010011000
1 0 1 0 1 0 1 0 __ 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 0 1 1 1 1 1 0 0 1 0__
0110011001100110 1010100101001001011001010110011001010100010101100101101001010101010010101001011001011010010101000110100101100101011010010100100110010101100101100101010001011001011010101010101010001010010101
1 0 1 0 1 0 1 0 0 0 0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 1 0 0 1 1 1 1 1 0 0 0 0 1 1 0 1 1 0 0 1 1 1__ 1 0 0 1 1 0 1 1 1 0 0 1 1 0 0 1 0 1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 0 0 0 0 0 0 0__
0110011001100110 0001100101011001010101010101001001010101010110010110100100
1 0 1 0 1 0 1 0 __ 1 0 1 1 1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 1 1 0 0 1__
@jboone
jboone / morse_synth.py
Last active June 7, 2022 16:32
Morse code baseband file synthesizer for HackRF.
#!/usr/bin/env python
# Copyright (C) 2015 Jared Boone, ShareBrained Technology
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
@jboone
jboone / gist:dfe4d81e80b41530dc51
Created March 16, 2015 21:52
KiCad Workshop Plan v0.0alpha
KiCad Workshop (subject to change, and bound by time constraints)
Features and functionality
Large-scale examples, including HackRF and Daisho projects
Background
Cross platform
Open source -- contribute! Bugs, documentation, code.
CERN involvement -- donate!
Goals for today:
Know what KiCad can and can't do
Have some idea how to do basic things
@jboone
jboone / gist:57f1e354ea7949c61832
Last active August 29, 2015 14:14
Setting up original-recipe PortaPack code
wget http://sharebrained.com/downloads/portapack_cpld_downgrade.dfu
# Plug in with DFU held.
dfu-util --download portapack_cpld_downgrade.dfu
# Screen should go white.
# Wait for green LED to blink.
# Screen should be black.
# Unplug.
@jboone
jboone / gist:d5222834e5b461248f3e
Created January 3, 2015 06:52
Linux U0 pre-enum phase.
<- Link Good 7
FE* FE* FE* F7* 07 68 07 68
-> Link Good 7
FE* FE* FE* F7* 07 68 07 68
---------------------------------------
-> Link Credit A
FE* FE* FE* F7* 80 A0 80 A0
@jboone
jboone / portapack_cpld.c
Created June 20, 2014 05:59
Code to program PortaPack CPLD (Altera MAX V) based on process in .SVF file.
static void portapack_cpld_jtag_tck(const uint_fast8_t value) {
if(value) {
gpio_set(PORTAPACK_CPLD_JTAG_TCK_GPIO_PORT, PORTAPACK_CPLD_JTAG_TCK_GPIO_BIT);
} else {
gpio_clear(PORTAPACK_CPLD_JTAG_TCK_GPIO_PORT, PORTAPACK_CPLD_JTAG_TCK_GPIO_BIT);
}
}
static void portapack_cpld_jtag_tdi(const uint_fast8_t value) {
if(value) {