Example #1
0
        private void Timer_Tick(object sender, EventArgs e)
        {
            double x_mm, y_mm, z_mm;

            us.Measure(out x_mm, out y_mm, out z_mm);
            updateUI(0, (int)x_mm, (int)y_mm, (int)z_mm);
        }
Example #2
0
        static void Main(string[] args)
        {
            var us = new UltrasonicSensor();

            double x_mm, y_mm, z_mm;

            while (true)
            {
                us.Measure(out x_mm, out y_mm, out z_mm);
                Console.WriteLine("X: " + x_mm.ToString() +
                                  " - Y: " + y_mm.ToString() +
                                  " - Z: " + z_mm.ToString());

                System.Threading.Thread.Sleep(500);
            }
        }