Skip to content

Instantly share code, notes, and snippets.

@kh4
kh4 / microPPM.ino
Created January 31, 2016 17:42
Simple Arduino sketch (328P only, i.e. mini, nano)
#include <Arduino.h>
#define MICROPPM
unsigned int startPulse=0;
#ifdef MICROPPM
#define PPM_CHANNELS 12 // input PPM into pin 8
#define PPM_SYNC 20000
#else
@kh4
kh4 / rscode_sender.c
Created April 2, 2012 11:22
Stripped down encoder (from rscode.sf.net)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define NPAR 8
void hexdump(unsigned char *buf,int n){
int i;
for (i=0; i<n; i++) {
@kh4
kh4 / AQ_debugtimer.patch
Created February 17, 2012 09:34
Aeroquad debugtimer
diff --git a/AeroQuad/AeroQuad.h b/AeroQuad/AeroQuad.h
index 7ed8f9f..5be4e12 100644
--- a/AeroQuad/AeroQuad.h
+++ b/AeroQuad/AeroQuad.h
@@ -275,5 +275,12 @@ byte fastTransfer = OFF; // Used for troubleshooting
//byte testSignal = LOW;
//////////////////////////////////////////////////////
+// DEBUG TIMER
+unsigned long dtLast=0, dtMin=99999999, dtMax=0, dtStart=0, dtAvg=0, dtCnt=0;