Code for a robot designed to collect magnetic samples.