Skip to content

Instantly share code, notes, and snippets.

@vo
vo / prog.sh
Last active July 5, 2016 02:53
Program WW-11 Boards
# THESE STEPS ARE FOR A FRESH BOARD
# If you are trying to reprogram a board, you need to remove the solder bridge on R7
# and use high voltage programming mode (HVSP) to reset the fuses
# See http://www.rickety.us/2010/03/arduino-avr-high-voltage-serial-programmer/
# for an example of how to make a DIY HVSP rig, or you can use
# a genuine AVR Dragon programmer to reset the fuses.
# set lower fuses
avrdude -c usbasp -p t85 -u -U lfuse:w:0xe2:m
ZDC WASHINGTON (ARTCC),DC.
!FDC 6/2069 ZDC PART 1 OF 8 SECURITY...SPECIAL SECURITY INSTRUCTIONS,
WASHINGTON, DC, EFFECTIVE 1602100501 UTC UNTIL FURTHER NOTICE.
SPECIAL SECURITY INSTRUCTIONS FOR UNMANNED AIRCRAFT OPERATIONS (UAS)
IN THE DC SPECIAL FLIGHT RULES AREA (SFRA), INCLUDING THE DC FLIGHT
RESTRICTED ZONE (FRZ), ARE IN EFFECT PURSUANT TO 14 CODE OF FEDERAL
REGULATIONS (CFR) SECTIONS 93.335, 93.337, 93.339, 93.341, AND 99.7,
AND 49 UNITED STATES CODE (USC) SECTION 40103(B)(3). THIS NOTAM
@vo
vo / ppm.c
Last active October 18, 2015 15:05
Teensyduino code to output swtich data on PPM
#include <PulsePosition.h>
#define PIN_PPM;
const int pin_ppm = 10;
const int pin_led = 13;
const int pin_master = 22;
PulsePositionOutput ppmOut;
int master_switch_on;
int save_state[9];
void setup() {
@vo
vo / gliDump.cpp
Created January 20, 2015 02:07
GL Dumping Screen
# include "gliDump.h"
/*
*****************************************************************************
* *
* You shouldn't need to modify any of the functions below this point. *
* *
*****************************************************************************
*/
@vo
vo / gist:054eae4d389ce4ad1f27
Created August 18, 2014 16:16
Programming Practice: Calculate and print the LCS
#include <iostream>
#include <vector>
#include <string>
using namespace std;
// get the LCS from the matrix
string get_LCS(vector<vector<char> > & S, string & X, int i, int j) {
string result;
if (i == 0 || j == 0)
return result; // empty string
@vo
vo / gist:be74826bb473831f30b1
Created May 5, 2014 15:45
Programming Practice: Basic Suffix Tree in C++
#include <iostream>
#include <cstring>
#include <climits>
using namespace std;
class index_list {
public:
int value;
index_list * next;
index_list(int i) : value(i), next(0) {}
@vo
vo / findPaths.cpp
Created April 5, 2014 02:19
Programming Practice: Find paths that sum to a given value
// find all paths in a binary tree
// which sum to a given value
#include <iostream>
#include <vector>
struct Node {
int val;
Node * left, *right;
Node(int v) : val(v) {
@vo
vo / gist:9907094
Created April 1, 2014 03:21
Programming Practice: Longest common subsequence
// dynamic programming longest common subsequence
#include <iostream>
#include <vector>
int main() {
const int N = 6;
int A[N] = {3, 2, 6, 4, 5, 1};
@vo
vo / dijkstra.cpp
Last active August 29, 2015 13:57
Programming Practice: Dijkstra's Algorithm
// this version does not use a priority queue
#include <iostream>
int main() {
const int N = 9; // number of nodes
const int start = 0; // source
const int goal = 4; // destination
@vo
vo / gist:9543136
Created March 14, 2014 06:51
Programming Practice: In-Place Heap Sort In C
#include <cstdio>
#include <ctime>
#include <cstdlib>
void make_heap(int * a, size_t n) {
for(int heapsize = 0; heapsize < n; ++heapsize) {
int n = heapsize;
while(n > 0) {
int p = (n-1) / 2;
if (a[n] > a[p]) {