Skip to content

Instantly share code, notes, and snippets.

View stilldavid's full-sized avatar
💽
minidisc'in

David Stillman stilldavid

💽
minidisc'in
View GitHub Profile
// RADIO
#define RADIO_SPACE 10
#define RADIO_MARK 11
#define ASCII_BIT 8
void rtty_txstring (char * string) {
char c;
c = *string++;
while ( c != '\0') {
rtty_txbyte (c);
uint8_t xor_checksum(char *string) {
size_t i;
uint8_t XOR;
uint8_t c;
XOR = 0;
// Calculate checksum ignoring the first two $s
for (i = 2; i < strlen(string); i++) {
c = string[i];
XOR ^= c;
}
$$KI6YMZ,128,2574900,4006514,-10521007,159260,17,25528,2056*0055
$$KI6YMZ,129,2580600,4006514,-10521008,159260,4,25528,2056*006D
$$KI6YMZ,130,2582300,4006514,-10521007,159260,6,25528,2062*0068
$$KI6YMZ,131,2584000,4006514,-10521007,159260,16,25528,2062*005D
$$KI6YMZ,132,2585700,4006512,-10521006,159260,15,25528,2056*005B
$$KI6YMZ,133,2591400,4006511,-10521005,159260,3,25528,2056*006B
$$KI6YMZ,134,2593100,4006510,-10521006,159260,4,25528,2056*006E
$$KI6YMZ,135,2594800,4006510,-10521006,159260,16,25528,2056*0052
$$KI6YMZ,136,3000500,4006512,-10521006,159260,14,25528,2056*0055
$$KI6YMZ,137,3002200,4006513,-10521007,159260,15,25528,2056*0050
Benchmarking 84.194.241.161 (be patient).....done
Server Software:
Server Hostname: 84.194.241.161
Server Port: 8080
Document Path: /
Document Length: 269 bytes
#include <Ethernet.h>
#include <SPI.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 20, 239 };
byte server[] = { 10, 10, 10, 2 }; // Google
Client client(server, 8001);
void setup()
{"type":"flight","name":"KI6YMZ-3","start":1318982400,"end":1318982400,"launch":{"time":1319036400,"timezone":"UTC-6"},"metadata":{"location":"Deer Trail, CO","project":"KI6YMZ-3"},"payloads":{"KI6YMZ":{"radio":{"frequency":"434.650","mode":"USB"},"telemetry":{"modulation":"rtty","shift":"425","encoding":"ascii-8","baud":"50","parity":"none","stop":"1"},"sentence":{"protocol":"UKHAS","checksum":"crc16-ccitt","payload":"KI6YMZ","fields":[{"name":"count","sensor":"base.ascii_int"},{"name":"time","sensor":"stdtelem.time"},{"name":"latitude","sensor":"stdtelem.coordinate","format":"dd.dddd"},{"name":"longitude","sensor":"stdtelem.coordinate","format":"dd.dddd"},{"name":"altitude","sensor":"base.ascii_int"},{"name":"speed_kph","sensor":"base.ascii_int"},{"name":"course","sensor":"base.ascii_int"},{"name":"temperature","sensor":"base.ascii_float"}]}}}}
// GPS
bool feedgps() {
gps_serial.println("$PUBX,00*33"); //Poll GPS
while (gps_serial.available()) {
if (gps.encode(gps_serial.read()))
return true;
}
return false;
}
@stilldavid
stilldavid / freeday.ino
Created January 12, 2012 17:08
Free Day Geiger Counter
#include <Ethernet.h>
#include <SFEbarGraph.h>
#include <SPI.h>
// Default 'ino MAC address
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 0, 2 };
int up = 8;
int down = 7;
@stilldavid
stilldavid / gist:1602315
Created January 12, 2012 18:46
Free Day Winners

1442 United States
108 Canada
41 United Kingdom
34 Spain
29 Netherlands
25 Sweden
25 Germany
20 Turkey
18 France
17 Italy

### Keybase proof
I hereby claim:
* I am stilldavid on github.
* I am stilldavid (https://keybase.io/stilldavid) on keybase.
* I have a public key whose fingerprint is 15CD 63B9 1F56 FA32 CA86 1B7B 4511 E02D 3D45 4E5A
To claim this, I am signing this object: