March 2018
Beginner to intermediate
410 pages
10h 40m
English
We are now ready to store our measured data. We use the lastMinute field defined earlier to know when we pass into a new minute. We use that opportunity to store the most recent value, together with the basic statistics we've calculated:
if (!this.lastMinute.HasValue)
this.lastMinute = Timestamp.Minute;
else if (this.lastMinute.Value != Timestamp.Minute)
{
this.lastMinute = Timestamp.Minute;
We begin by creating an instance of the LastMinute class defined earlier:
LastMinute Rec = new LastMinute()
{
Timestamp = Timestamp,
Light = Light,
Motion= D8,
MinLight = this.minLight,
MinLightAt = this.minLightAt,
MaxLight = this.maxLight,
MaxLightAt = this.maxLightAt
};
Storing this object is very easy. The call is asynchronous ...
Read now
Unlock full access