Merge @orviwan's accelerometer code with BOLD