diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Pmsa003I/Samples/Pma003I_Sample/MeadowApp.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Pmsa003I/Samples/Pma003I_Sample/MeadowApp.cs index ccdc167cc8..0302beb414 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Pmsa003I/Samples/Pma003I_Sample/MeadowApp.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Pmsa003I/Samples/Pma003I_Sample/MeadowApp.cs @@ -15,15 +15,6 @@ public class MeadowApp : App Pmsa003i pmsa003i; - public override Task Run() - { - Resolver.Log.Info("Run..."); - - pmsa003i.StartUpdating(TimeSpan.FromSeconds(2)); - - return base.Run(); - } - public override Task Initialize() { var bus = Device.CreateI2cBus(I2cBusSpeed.Standard); @@ -34,6 +25,15 @@ public override Task Initialize() return base.Initialize(); } + public override Task Run() + { + Resolver.Log.Info("Run..."); + + pmsa003i.StartUpdating(TimeSpan.FromSeconds(2)); + + return base.Run(); + } + private void Pmsa003i_Updated(object sender, IChangeResult<( Density? StandardParticulateMatter_1micron, Density? StandardParticulateMatter_2_5micron,