Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
growing excited

Todd Stellanova tstellanova

💭
growing excited
View GitHub Profile
@tstellanova
tstellanova / adsbex_armbian.md
Last active Oct 16, 2021
Setup an Armbian-based adbsexchange feeder with both 1090 and 978 MHz support
View adsbex_armbian.md

1090 Support

Install prerequisites:

sudo apt-get install rtl-sdr lighttpd
sudo apt-get install build-essential debhelper librtlsdr-dev pkg-config dh-systemd libncurses5-dev libbladerf-dev
sudo apt install libhackrf-dev liblimesuite-dev libbladerf-dev  
@tstellanova
tstellanova / sdr_rpi4_buster.md
Last active Sep 6, 2021
Setup SDR on RPi4 buster image
View sdr_rpi4_buster.md
sudo apt-get update --fix-missing
sudo apt-get install -y  screen sox build-essential libconfig++-dev libsox-fmt-mp3 libfftw3-dev librtlsdr-dev libshout3-dev 
sudo timedatectl set-timezone America/Los_Angeles
@tstellanova
tstellanova / particle-cli-install-buster.md
Created Feb 28, 2021
Install particle-cli on Raspberry Pi 4 running raspbian buster
View particle-cli-install-buster.md
sudo apt-get update
sudo apt-get install build-essential libudev-dev
bash <( curl -sL https://particle.io/install-cli )
@tstellanova
tstellanova / rust-serialports.md
Last active Feb 7, 2021
Serial port enumeration with rust
View rust-serialports.md

Assumes Debian-based linux

  • (install rust, eg sudo snap install --classic rustup on Ubuntu, or via bash command curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh)
  • Using serialports-rs package
  • requires libudev under linux: sudo apt-get install libudev-dev
  • git clone https://gitlab.com/Susurrus/serialport-rs
  • cargo run --example list_ports
  • With a couple Particle devices attached, output will be something like:
@tstellanova
tstellanova / monolithic_particle_fw.md
Created Jan 19, 2021
Build monolithic particle firmware
View monolithic_particle_fw.md

In the device OS directory

cd main
make PLATFORM=boron MODULAR=n all APPDIR=/path/to/your/app/dir
@tstellanova
tstellanova / particle_serial_term_setings.md
Last active Jan 7, 2021
Particle serial logging interactive terminal settings (for eg cloud-debug) using picocom
View particle_serial_term_setings.md

Serial logger output tends to be ugly on raw terminal because of missing carriage returns. With picocom you can map raw LFs to CRLF:

picocom -b 115200 --imap lfcrlf  /dev/ttyACM0
@tstellanova
tstellanova / particle_linux_setup.md
Created Oct 14, 2020
Setup particle.io dev env on linux bionic
View particle_linux_setup.md
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt-get update
sudo apt-get install gcc-arm-embedded
@tstellanova
tstellanova / ntt_notes.rs
Created Aug 18, 2020
number theoretic transform
View ntt_notes.rs
pub trait FFT: Sized + Copy {
type F: Sized
+ Copy
+ From<Self>
+ Neg
+ Add<Output = Self::F>
+ Div<Output = Self::F>
+ Mul<Output = Self::F>
+ Sub<Output = Self::F>;
@tstellanova
tstellanova / embedded_bootloader_quirks.md
Last active Aug 5, 2020
Embedded board bootloaders and their quirks
View embedded_bootloader_quirks.md

Micropython

  • Source code
  • Allows firmware update via USB (and possibly other methods?)
  • The is 128 kB minimum, some boards reserve 256 kB (eg OpenMV)
  • The jump address varies depending on the board
  • Example: OpenMV H7 board bootloader is 128 kB in size, reserves 256 kB in flash, and has an application jump address of 0x8040000
@tstellanova
tstellanova / cam_module_learning.md
Created Jul 7, 2020
Learning about camera modules
View cam_module_learning.md

There are a million camera modules out there. Many support a common hardware interface:

  • A set of parallel data lines that provide image (pixel) data
  • A set of scan line and frame synchronization output lines (horizontal and vertical sync, and pixel clock)
  • A low-speed two-wire (i2c) configuration and control interface
  • A clock input. Many of these modules do not have their own hardware clock connected: instead they rely upon a microcontroller or the CPU they're attached to to provide a clock.

Fun fact

When you connect the i2c lines of the module to, say, a linux i2c bus and run, say, sudo i2cdetect -y 1,