Skip to content

Instantly share code, notes, and snippets.

Avatar

TT edy555

View GitHub Profile
View Jetson TK1 IPython Notebook PyCUDA.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View MagnetRotaryEncoder2.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@edy555
edy555 / README.md
Last active Dec 30, 2016
OSX patch for RISC-V emulator riscvemu-2016-12-20.1
View README.md

Build riscvemu on OSX

$ curl -O http://bellard.org/riscvemu/riscvemu-2016-12-20.1.tar.gz
$ tar xfz riscvemu-2016-12-20.1.tar.gz
$ cd riscvemu-2016-12-20.1
$ patch -p0 < ../riscvemu-2016-12-20.1-osx.patch
$ make

Test

View rtlsdr-wbfm-stereo.lua
local radio = require('radio')
radio.CompositeBlock():connect(
radio.RtlSdrSource(88.5e6 - 250e3, 1102500), -- RTL-SDR source, offset-tuned to 88.5 MHz - 250 kHz
radio.TunerBlock(-250e3, 200e3, 5), -- Translate -250 kHz, filter 200 kHz, decimate 5
radio.FrequencyDiscriminatorBlock(1.25), -- Frequency demodulate with 1.25 modulation index
radio.LowpassFilterBlock(128, 15e3), -- Low-pass filter 15 kHz for L+R audio
radio.FMDeemphasisFilterBlock(75e-6), -- FM de-emphasis filter with 75 uS time constant
radio.DownsamplerBlock(5), -- Downsample by 5
radio.PulseAudioSink(1) -- Play to system audio with PulseAudio
View rtlsdr-wbfm-stereo.lua
local radio = require('radio')
radio.CompositeBlock():connect(
radio.RtlSdrSource(88.5e6 - 250e3, 1102500), -- RTL-SDR source, offset-tuned to 88.5 MHz - 250 kHz
radio.TunerBlock(-250e3, 200e3, 5), -- Translate -250 kHz, filter 200 kHz, decimate 5
radio.FrequencyDiscriminatorBlock(1.25), -- Frequency demodulate with 1.25 modulation index
radio.LowpassFilterBlock(128, 15e3), -- Low-pass filter 15 kHz for L+R audio
radio.FMDeemphasisFilterBlock(75e-6), -- FM de-emphasis filter with 75 uS time constant
radio.DownsamplerBlock(5), -- Downsample by 5
radio.PulseAudioSink(1) -- Play to system audio with PulseAudio
@edy555
edy555 / si5351.h
Last active Sep 11, 2016
Si5351Aで任意の周波数を設定するためのコード。I2C部分は環境に合わせて適当に置き換える必要がある。
View si5351.h
#define SI5351_PLL_A 0
#define SI5351_PLL_B 1
#define SI5351_MULTISYNTH_DIV_4 4
#define SI5351_MULTISYNTH_DIV_6 6
#define SI5351_MULTISYNTH_DIV_8 8
#define SI5351_R_DIV_1 (0<<4)
#define SI5351_R_DIV_2 (1<<4)
#define SI5351_R_DIV_4 (2<<4)
#define SI5351_R_DIV_8 (3<<4)
@edy555
edy555 / plotdata.py
Created Sep 3, 2016
NanoVNAのテスト用コード。シリアル経由でデータを取ってきて、波形とスペクトラムをプロット。
View plotdata.py
#!/usr/bin/env python
import serial
import numpy as np
import pylab as pl
dev = '/dev/cu.usbmodem401'
ser = serial.Serial(dev)
def fetch_data():
ser.write("data 0\r")
@edy555
edy555 / rtlfmsdr.py
Last active Jun 21, 2022
Python based FM Receiver -- Experiment of Realtime Signal Processing in Python
View rtlfmsdr.py
#!/usr/bin/env python
#
# RTL FM Receiver - Python based realtime RF signal processing experiment
# @edy555 2016
# requirement: numpy, scipy, pyaudio, pyrtlsdr
import numpy as np
import scipy.signal
import array
import rtlsdr
@edy555
edy555 / RiehmanZetaRecursion.ipynb
Last active Jun 8, 2016
今度はリーマンゼータ関数の漸化式での計算をPythonで試してみた。前回のはこちら。http://nbviewer.jupyter.org/gist/edy555/9988efd898d11fba2540
View RiehmanZetaRecursion.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@edy555
edy555 / sketchuplogo.stl
Last active Mar 12, 2016
sketchupの練習
View sketchuplogo.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.