Old accelerometer code

Found it on my computer so I added it to github before I delete it