tempX -> tempPitch. Fixed minor bugs. added #ifdef ARDUINO_PRESENT