BrickPiExample.MainPage.LunchFollowMe C# (CSharp) Method

LunchFollowMe() private method

private LunchFollowMe ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        private async Task LunchFollowMe()
        {
            EV3TouchSensor touch = new EV3TouchSensor(BrickPortSensor.PORT_S1);
            NXTUltraSonicSensor ultra = new NXTUltraSonicSensor(BrickPortSensor.PORT_S3, UltraSonicMode.Centimeter);
            robot = new Vehicule(BrickPortMotor.PORT_B, BrickPortMotor.PORT_C);
            while (!touch.IsPressed())
            {
                int valultra = ultra.Value;
                if ((valultra < 70) && (valultra!=0))
                {
                    Debug.WriteLine($"Taking picture, distance {valultra} cm");
                    await MakePicture();
                }
                    
                await Task.Delay(10);
            }
            Debug.Write("end of face tracking and detection");
        }