Example #1
0
        private void sweep(object sender, EventArgs e)
        {
            linTimer.Stop();
            if (flip)
            {
                linArduino.SweepLeft(6.0);
            }
            else
            {
                linArduino.SweepRight(6.0);
            }

            flip = !flip;

            Console.WriteLine("sweep");
            rotTimer.Start();
        }
Example #2
0
        private void SweepEvent(object sender, EventArgs e)
        {
            linTimer.Stop();
            if (toTheLeftToTheLeft)
            {
                linArduino.SweepLeft(scanDistance);
            }
            else
            {
                linArduino.SweepRight(scanDistance);
            }

            sensor.GetLine(numSamplesPerLine);
            //serialPort1.WriteLine("1,11,10");

            toTheLeftToTheLeft = !toTheLeftToTheLeft;

            Console.WriteLine("sweep");
            rotTimer.Start();
        }