Latest arduino code for Pivot. Code created post thesis.