GabrielBianconi/ArduinoNunchuk — pull request #3 by Swap-File (2013-03-20 01:05:30+00:00)
Title: Automatic Reinit

1: If only 0xFF is received from the Nunchuk a reinit is automatically
attempted.

2: If only partial data is received the sensor values won't
be updated.

3: The transmission delay was moved to init() only. I'm
not sure how much of a delay is needed in the init, but program code
should provide the delay at the end of update(). This sped my program
up significantly, from processing at 40FPS to 80FPS.

4: Changed some ints to uint8_t. Didn't look like a full int was needed, and it uses less ram and generates smaller code.