March 2018
Beginner to intermediate
410 pages
10h 40m
English
After the database provider has been successfully registered, the persistence layer is ready to be used. We now continue with the first step in acquiring the sensor data: sampling. Sampling is normally done using a short regular time interval. Since we use the Arduino, we get values as they change. While such values can be an excellent source for event-based algorithms, they are difficult to use in certain kinds of statistical calculations and error-correction algorithms. To set up the regular sampling of values, we begin by creating a Timer object from the System.Threading namespace, after the successful initialization of the Arduino:
this.sampleTimer = new Timer(this.SampleValues, null, 1000 - DateTime.Now.Millisecond, ...
Read now
Unlock full access