Requires WiringPi
Compile with;
git pull origin
gcc -o main -l rt main.c -lm -lwiringPi
rpi accelerometer http://ozzmaker.com/guide-to-interfacing-a-gyro-and-accelerometer-with-a-raspberry-pi/
grove arduino accelerometer https://github.com/Seeed-Studio/Accelerometer_And_Gyroscope_LSM6DS3/blob/master/SparkFunLSM6DS3.cpp
wire to wiringpi https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=53680