initialized libraries for magnet sensor