What had to be solved
The task was to make a small universal sensor that could be used not only as a magnetometer but also as a rotation sensor. One device had to combine 3D magnetic-sensor polling, angle calculation, rotation-speed measurement, turn counting and a simple setup interface without a separate user application.