stop dumb use of malloc
sample sensors five times to reduce errors