Accelerometer

Where exactly do I put the accelerometer code?

Nowhere particularly secretive or hidden. Depending on how your main robot code is, you’ll probably want to slap your code into seperate accelerometer.c and accelerometer.h files, and interface with it in user_routines.c