Redrawing canvas on change in magnetic sesor reading