Skip to content

Instantly share code, notes, and snippets.

@hsiboy
hsiboy / NASA_Marine_navtex.txt
Last active June 4, 2021 19:50
Interface Specification for NASA Marine PC Navtex Pro
Interface Specification for NASA Marine PC Navtex Pro
1 - Electronic Interface
Power input: +10Volts to + 16Volts.
RS232 interface:
data format: 8 bits, 1 start bit, no parity, 1 stop bit.
Connector: 9-pin D-type socket mounted on the board.
pin 2: 38,400 Baud output from Engine to PC
pin 3: 38,400 Baud input to Engine from PC
@hsiboy
hsiboy / direwolf_install.sh
Created August 26, 2018 11:02
Installing direwolf for an iGate on fresh raspberry pi
# assumes rtl sdr is installed
cd ~
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libasound2-dev cmake build-essential libusb-1.0-0-dev
git clone https://www.github.com/wb2osz/direwolf
cd direwolf
make
sudo make install
make install-conf
@hsiboy
hsiboy / gpsd.sh
Created July 20, 2018 10:28
Adding GPS to Raspberry Pi running PiAware / Dump1090 for ADS-B Flight Tracking
sudo apt-get install -y gpsd
sudo apt-get install -y gpsd-clients
sudo apt-get install -y python-gps
sudo apt-get install -y libcap-dev
sudo apt-get install -y pps-tools
echo console=ttyACM0,115200 >> /boot/cmdline.txt
# edit /etc/rc/local and add (before the exit 0)
# sudo gpsd /dev/ttyACM0 -F /var/run/gpsd.sock
@hsiboy
hsiboy / watchdog.sh
Created July 18, 2018 16:47
Install watchdog service on raspberry pi - restart raspberry pi if x
# install the service
sudo modprobe bcm2708_wdog
echo "bcm2708_wdog" | sudo tee -a /etc/modules
sudo apt-get install watchdog
sudo update-rc.d watchdog defaults
# configure service
sudo vi /etc/watchdog.conf
# Uncomment the line that starts #watchdog-device to enable the watchdog daemon to use the watchdog device.
@hsiboy
hsiboy / install_sdr.sh
Created July 13, 2018 12:48
script to install rtl_sdr on fresh raspberry pi.
cd ~
sudo raspi-config --expand-rootfs
sudo apt-get update
sudo apt-get upgrade
cat <<EOF >no-rtl.conf
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830
EOF
sudo mv no-rtl.conf /etc/modprobe.d/
@hsiboy
hsiboy / locate.sh
Created July 13, 2018 10:51
Used to locate a Raspberry PI via flashing on-board LED
#!/bin/bash
if [[ $UID -ne 0 ]]; then
echo "This script must be run as root."
exit 100
fi
# decativate the mmc0 trigger
echo none >/sys/class/leds/led0/trigger
modprobe ledtrig_timer

Keybase proof

I hereby claim:

  • I am hsiboy on github.
  • I am stuarttaylor (https://keybase.io/stuarttaylor) on keybase.
  • I have a public key ASARxl6QyjoM_130xs1VjVfVZ47blsbzLOUIHz2t4-SFUAo

To claim this, I am signing this object:

@hsiboy
hsiboy / ENC28J60.md
Created February 6, 2018 19:55
Connecting an ENC28J60 module to a STM32F103
 
ENC28J60  STM32F103
SCK        PA5
SO         PA6
SI         PA7
CS         PA4
RST        PA0
 
VCC - 5V
:100000000C9463000C948B000C948B000C948B006C
:100010000C948B000C948B000C948B000C948B0034
:100020000C948B000C948B000C948B000C948B0024
:100030000C948B000C948B000C948B000C948B0014
:100040000C9419070C948B000C94B6060C94900633
:100050000C948B000C948B000C948B000C948B00F4
:100060000C948B000C948B000000000025002800ED
:100070002B0000000000240027002A0000000000E0
:1000800023002600290004040404040404040202DA
:100090000202020203030303030301020408102007
#include <SPI.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
#define USE_OCTOWS2811
#include <OctoWS2811.h>
#include <FastLED.h>
// enter desired universe and subnet (sACN first universe is 1)
#define DMX_SUBNET 0
#define DMX_UNIVERSE 1 //**Start** universe