Skip to content

Instantly share code, notes, and snippets.

View NT7S's full-sized avatar

Jason Milldrum NT7S

View GitHub Profile
@NT7S
NT7S / ZeroUARTFlowControl.ino
Created December 15, 2017 21:11
Empyrean/Arduino Zero USB-UART Flow Control
uint8_t led = LED_BUILTIN;
void setup() {
SerialUSB.begin(57600);
pinMode(led, OUTPUT);
}
void loop() {
if(SerialUSB.rts()) {
digitalWrite(led, HIGH);
@NT7S
NT7S / lorenz.py
Last active March 10, 2017 18:09
Draw the Lorenz system in Python/GTK
# lorenz.py
# 5 March 2016
#
# Copyright 2016 Jason Milldrum
#
# Draw the Lorenz system in a GTK window
# See https://en.wikipedia.org/wiki/Lorenz_system
import math
import gi
/*
Keyboard Controller Example
Shows the output of a USB Keyboard connected to
the Native USB port on an Arduino Due Board.
created 8 Oct 2012
by Cristian Maglie
http://arduino.cc/en/Tutorial/KeyboardController
/*
* si5351_vcxo.ino - Example for using the Si5351B VCXO functions
* with Si5351Arduino library
*
* Copyright (C) 2015 Jason Milldrum <milldrum@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@NT7S
NT7S / si5351_freq_bug.ino
Created November 6, 2016 22:33
Si5351Arduino v2.0.0 library frequency bug test
/*
* si5351example.ino - Simple example of using Si5351Arduino library
*
* Copyright (C) 2015 Jason Milldrum <milldrum@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
@NT7S
NT7S / homebrew-arduino-zero-setup.md
Created June 29, 2015 18:45
Homebrew Arduino Zero Tool Setup

Homebrew Arduino Zero Tool Setup

A guide for installing the tools necessary to build up a homebrew barebones Arduino Zero (based on the Atmel SAMD21G18A microcontroller) on a Linux PC. While this guide is written for a Debian-based distribution such as Linux Mint, it should be adaptable to other distributions fairly easily.

This guide also assumes that we will be using the ATMEL-ICE debugger to write the Arduino bootloader to the SAMD21G18A flash memory via the Cortex Debug Connector.

Install Arduino IDE

You'll need a recent version of the Arduino IDE which has support for the Arduino Zero in the Boards Manager. As of this writing, the latest stable version is 1.6.5, so be sure to use at least this version. Also as of this writing, the version of the Arduino IDE in the Linux Mint repositories is quite old, so don't use that one.

@NT7S
NT7S / attractors.py
Last active March 11, 2016 04:50
Strange Attractors
# coding: utf-8
# attractors.py
# 10 March 2016
#
# Copyright 2016 Jason Milldrum
#
# Draw various attractors in a GTK window
# See:
# https://en.wikipedia.org/wiki/Lorenz_system
@NT7S
NT7S / wspr_encode.c
Created September 25, 2015 02:29
My unoptimized implementation of the WSPR encoding process
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <ctype.h>
uint8_t wspr_code(char c)
{
/* Validate the input then return the proper integer code */
// Return 255 as an error code if the char is not allowed
@NT7S
NT7S / jt9_encode.c
Created September 28, 2015 00:57
JT9 Encoder in C
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <ctype.h>
uint8_t jt_code(char c)
{
/* Validate the input then return the proper integer code */
// Return 255 as an error code if the char is not allowed
@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()