December 2013
Beginner
416 pages
12h 45m
English
Sensor values that are erratic can cause issues in your application. For instance, in the example you’ve been working with, they could cause your app to jump in and out of night mode rapidly. There are several ways to deal with erratic values. You can smooth out the values by doing the following:
Throwing away the value you know to be wrong or out of the range of expected values.
Using an average of values rather than the raw value each time.
When a sensor value triggers a change, waiting to change back until ...
Read now
Unlock full access