Change to getPosition and sample program

- fixed the structure of the example code to match the Arduino standard.
Code suggestions were kindly made by Adriano @ Adrirobot
http://it.emcelettronica.com/author/adrirobot/
- addressed a problem with the getPosition call, which previously
required 2 calls in order to return a result. This is believed to be be
due to latency.