Direction error code

Can you help I am trying to work out how to get Arduino uno coupled with a BN0055 3 axis accel, magnotometer to do the following.
Upon switch on mag detector reads zero or null if turns right 5 degrees it switches on an LED and off when back within 2 degrees zero. similarly turns right 5 degrees a different LED illuminates off again when back to within 2 degrees of zero.
Does this sound a doable project?
allan

Oops the second turn right should read turn LEFT

You do know that this is the 'pay for' section of the forum? Where people commission projects that they want building?