Skip to content

Instantly share code, notes, and snippets.

View ast's full-sized avatar
🥸
Let's code!

Albin Stigo ast

🥸
Let's code!
View GitHub Profile
@ast
ast / rtc-watchdog-hat.org
Created November 14, 2022 18:45
Waveshare watchdog hat configuration
@ast
ast / agc.c
Created July 4, 2020 15:35
Dead simple AGC.
typedef struct {
float attack_rate;
float decay_rate;
float reference;
float max_gain;
float gain;
} agc_t;
void agc_init(agc_t *agc, float attack_rate, float decay_rate, float reference) {
agc->attack_rate = attack_rate;
@ast
ast / doublemap.c
Last active July 4, 2020 15:55
My double mapped ringbuffer implementation intended for DSP applications.
//
// doublemap.c
// spieserver
//
// Created by Albin Stigö on 2019-12-08.
// Copyright © 2019 Albin Stigo. All rights reserved.
//
#include "doublemap.h"
@ast
ast / duplex.md
Last active November 12, 2019 19:12
Experiments with full duplex audio streaming in gstreamer

Experiments with full duplex audio streaming in gstreamer

  • Expected behaviour: full duplex stream
  • Observed behaviour: does not start sending until data is received.
AUDIO_CAPS="audio/x-raw,format=S16LE,rate=24000"
RTP_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)48000,encoding-name=(string)OPUS,payload=(int)96"

REMOTE=192.168.1.10
@ast
ast / Yaesu FC-30.org
Last active April 4, 2023 14:51
Reverse engineering the Yaesu FC-30 antenna tuner protocol

Reverse engineering the Yaesu FC-30

Notes about the Yaesu FC-30 tuner connected to the FT-891 radio. I have not been able to find any information online at all about the propriatry protocol used, so I’m compiling this from my observations.

The ultimate goal of this project is to connect an Icom AH-4 tuner to Yaesu radios.

Data shown is hex. Data in [brackets] are from tuner. Data without brackets are from radio.

Seems tuning is done in three steps:

@ast
ast / gnuradio-rbpi3.cmake
Created December 25, 2018 12:17
Builds GNURadio C++ OOT modules for Raspberry Pi 3
# Builds GNURadio C++ OOT modules for Raspberry Pi 3
# Created sysroot like this:
# rsync -rl --delete-after --safe-links pi@sdr.local:/{lib,usr} $HOME/src/sysroot
# used clang 7.0 and binutils 2.31
# mkdir build
# cd build
# cmake -DENABLE_DOXYGEN=OFF -DCMAKE_TOOLCHAIN_FILE=~/src/rbpi3.cmake ..
@ast
ast / deint_scale_mix.c
Created August 5, 2018 07:05
Deinterleave, scale and multiply 4 IQ float32 samples. NEON assembly.
#if defined(__GNUC__) && !defined(__ARM_NEON__) && !defined(__ARM_NEON)
#error "compiling simd-neon.h requires -mfpu=neon or equivalent"
#endif
void deint_scale_mix(int16_t *frames, float complex *m, float complex *iq
*) {
float scale = 1./32767;
/* Deinterleave, scale and mix */
@ast
ast / Stepcraft420-GRBLized.md
Created June 8, 2018 10:13
Stepcraft 420 CNC settings with GRBLizer

Stepcraft 420 CNC settings with GRBLizer

My notes on getting GRBL v1.1 working with the GRBLizer board.

Setup

  • Stepcraft 420 CNC
  • Stepcraft drivers with GRBLizer board
  • GRBL v1.1
@ast
ast / asoundrc
Created May 13, 2018 18:05
An example asoundrc for SDR
defaults.pcm.rate_converter "speexrate_best"
pcm.funcube {
type hw
card V20
device 0
rate 192000
format S16_LE
channels 2
}
@ast
ast / epoll.go
Last active May 7, 2018 18:54
Minimal viable epoll package for go
package epoll
import (
"golang.org/x/sys/unix"
"os"
)
type Op uint32
const (