Sensor update doesn't work.. no idea why I get trouble with enter a loop.. maybe it could be a good idea to change to int reather than double