Skip to content

Instantly share code, notes, and snippets.

View NT7S's full-sized avatar

Jason Milldrum NT7S

View GitHub Profile
@NT7S
NT7S / pisphere.py
Last active March 26, 2019 15:59
Create a sphere in Minecraft Pi Edition Quick, dumb, and dirty, but it shows the basics of how to access the API.
import minecraft.minecraft as minecraft
import minecraft.block as block
mc = minecraft.Minecraft.create()
mc.postToChat("Hallo, here's your sphere")
radius = 6
playerPos = mc.player.getPos()
@NT7S
NT7S / pilife.py
Last active December 13, 2015 17:59
Very rudimentary Conway's Game of Life implementation. Now sets out a Life playing area 64 x 64 cells in the center of the world, along with a fancy retaining wall. Updates quite a bit faster than the last version since we are now only working on a small section of the whole world.
# pilife.py
#
# Jason Milldrum
# 18 Feb 2013
#
# www.nt7s.com/blog
import minecraft.minecraft as minecraft
import minecraft.block as block
import numpy
@NT7S
NT7S / hamqth.py
Last active January 3, 2016 14:59
Class to query HamQTH
import urllib
import urllib2
import xml.etree.ElementTree as ET
import datetime
class hamqth:
username = None
password = None
session_id = None
session_id_timestamp = datetime.datetime.now()
@NT7S
NT7S / therm.py
Created May 18, 2014 09:45
Thermal Chamber
import usbtmc
import serial
import time
import sys
import math
temperature = 0.0
def printparams():
# Get the elapsed time
#include "si5351.h"
#include "Wire.h"
Si5351 si5351;
long a;
int inData;
void setup()
{
// Start serial and initialize the Si5351
@NT7S
NT7S / varicode.ino
Created March 11, 2015 18:48
Parse varicode
uint16_t varicode[] = {
0b1010101011000000, // 0 NUL
0b1011011011000000, // 1 SOH
0b1011101101000000, // 2 STX
0b1101110111000000, // 3 ETX
0b1011101011000000, // 4 EOT
0b1101011111000000, // 5 ENQ
0b1011101111000000, // 6 ACK
0b1011111101000000, // 7 BEL
0b1011111111000000, // 8 BS
@NT7S
NT7S / Si5351A_PSK.ino
Last active April 23, 2023 19:53
Generate PSK31 with an Si5351A
#include <si5351.h>
#include "Wire.h"
Si5351 si5351;
uint16_t varicode[] =
{
0b1010101011000000, // 0 NUL
0b1011011011000000, // 1 SOH
0b1011101101000000, // 2 STX
@NT7S
NT7S / Si5351_PSK_Ext.ino
Created April 2, 2015 16:40
Generate PSK with an Arduino and Si5351
#include <si5351.h>
#include "Wire.h"
Si5351 si5351;
uint16_t varicode[] =
{
0b1010101011000000, // 0 NUL
0b1011011011000000, // 1 SOH
0b1011101101000000, // 2 STX
@NT7S
NT7S / Si5351AntennaAnalyzer.ino
Created April 20, 2015 21:12
Si5351 Antenna Analyzer
#include <si5351.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <Wire.h>
#include <DFR_Key.h>
#include <LiquidCrystal.h>
#define V_SAMPLE A1
#define I_SAMPLE A2
@NT7S
NT7S / Si5351_LCD_VFO.ino
Created April 25, 2015 17:55
Basic Si5351 VFO for LCD
/*
Si5351 VFO
By LA3PNA 27 March 2015
This version uses the new version of the Si5351 library from NT7S.
see: http://arduino.cc/en/Reference/AttachInterrupt for what pins that have interrupts.
UNO and 328 boards: Encoder on pin 2 and 3. Center pin to GND.
Leonardo: Encoder on pin 0 and 1. Center pin to GND.