Tilt function with LSM6DS3 not showing the right values

After reading the "How to get the best out of the forum" post, please post the code, using code tags, and examples of the output (quoted text).

Forum members are very unlikely to go off site looking for your stuff.