I saw this on the SPI projects page and thought it looked neat.

Code: https://github.com/ArduPilot/ardupilot