This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
void swap(int &a, int &b) { | |
int tmp = a; | |
a = b; | |
b = tmp; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Written by Nick Gammon | |
// February 2011 | |
/** | |
* Send arbitrary number of bits at whatever clock rate (tested at 500 KHZ and 500 HZ). | |
* This script will capture the SPI bytes, when a '\n' is recieved it will then output | |
* the captured byte stream via the serial. | |
*/ | |
#include <SPI.h> |