Magnet sensor sweep code

Evidently that library does not support your board, which is not from Arduino.

When posting, it is always a good idea to indicate what board you are using.