Skip to content

Instantly share code, notes, and snippets.

View M0LTE's full-sized avatar

Tom M0LTE M0LTE

View GitHub Profile
@M0LTE
M0LTE / callsign-countries.txt
Created March 26, 2018 20:56
Expanded current list of radio callsign prefixes and countries, both ITU and non-ITU
HB3Y Liechtenstein
3DA Swaziland
3DB Swaziland
3DC Swaziland
3DD Swaziland
3DE Swaziland
3DF Swaziland
3DG Swaziland
3DH Swaziland
3DI Swaziland
@M0LTE
M0LTE / install-dw-igate.sh
Created March 27, 2018 22:11
Almost-working igate-on-a-pi script
#!/bin/bash -e
# for some reason line 65 doesn't start DW, needs a bit more work
apt-get install build-essential git cmake libusb-1.0-0-dev libasound2-dev screen
git clone https://www.github.com/wb2osz/direwolf
git checkout dev # switch to dev branch, optional
pushd direwolf
make
make install
@M0LTE
M0LTE / gist:baefef79a06f74fecf0745de00537b38
Created March 28, 2018 19:50
FlexRadio Systems FlexControl USB control protocol
Identifies as USB Serial vendor 0x2192 product 0x0010
Sends data at 9600 bps 8N1
AUX1/2/3 buttons
single tap X1S / X2S / X3S
double tap X1C / X2C / X3C
press and hold X1L / X2L / X3L (on release)
rotate dial anti/clockwise D / U
faster D/U02..D03..D04 up to at least 6
@M0LTE
M0LTE / u-blox_rate_init.c
Created April 3, 2018 21:12
Configure the u-blox neo-6m for minimal output with 500ms updates from Arduino / C
// configure the u-blox neo-6m for minimal output with 500ms updates
byte startup[] = {
/* 500ms updates
B5 62 06 08 06 00 F4 01 01 00 01 00 0B 77 */
0xB5, 0x62, 0x06, 0x08, 0x06, 0x00, 0xF4, 0x01, 0x01, 0x00, 0x01, 0x00, 0x0B, 0x77
/* disable $GPGSV
B5 62 06 01 03 00 F0 03 00 FD 15 */
, 0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x03, 0x00, 0xFD, 0x15
@M0LTE
M0LTE / pips.sh
Last active April 15, 2018 17:07
Pips for Jonathan (also now partly BY Jonathan)
#!/bin/bash -e
# you need to run this file at startup.
# copy it to your system, make it executable (chmod +x pips.sh), then use /etc/rc.local or whatever to start it up once at boot.
# shouldn't really ever crash, there's nothing to go wrong, as long as the audio player never fails. Then you might
# want some error checking.
while true; do
# get time now in nanoseconds since 1970-01-01 00:00:00
now=$(date +%s%N)
@M0LTE
M0LTE / gist:f1669b2b8f719fd4c851db867da8cda4
Last active June 23, 2018 23:17
WellGood Loop components
C1, C2 133-5699 82pF A82J (blue)
C3, C7, C101, C102 191-985 2.2uF (must be poly-carbonate in signal path) mmkbjo63-
C4, C5, C10, C13 538-1310 100nF k5k 104 (yellow)
C6 538-1146 10pF k2j 100 (yellow)
C8, C9 312-1582 330nF
R1 148-528 1.2kΩ
R2 148-578 2kΩ
Q1, Q2 739-0381 PN2222 / ZTX653 / MPSH10
D1, D2, D3, D4 671-5477 1N4148
CON1,2,3 512-1225 RF-BNC
@M0LTE
M0LTE / ardupips.ino
Last active May 14, 2018 22:12
Arduino pips
void setup() {
pinMode(6, OUTPUT);
pinMode(10, OUTPUT);
Serial.begin(9600);
}
void loop() {
digitalWrite(10, HIGH);
delay(1000);
#in /root/update-wordpress.sh:
#!/bin/bash -e
export PATH="$PATH:/usr/local/bin"
# change this
siteroot=/var/www/html
webserveruser=nginx
wp cli update --quiet
@M0LTE
M0LTE / cty.dat.json
Last active June 15, 2018 15:24
cty.dat from WSJT-X 1.9.0 rc4 re-packed as dictionary
This file has been truncated, but you can view the full file.
{
"1A": [
{
"ctry": "Sov Mil Order of Malta",
"pre": "1A",
"tz": -1.0,
"lon": -12.43,
"lat": 41.9,
"cnt": "EU",
"itu": 28,
4.2V
3.7V
3.0V
5s = 21.0V -> 18.5V -> 15V
4s = 16.8V -> 14.8V -> 12V
3s = 12.6V -> 11.1V -> 9V
13.8V + 10% = 15.18V
13.8V - 10% = 12.42V