Added acceleration code. Not tested with Arduino yet