예제 #1
0
        static void Main()
        {
            Console.WriteLine("\nMikroelektronika ADAC Click GPIO Toggle Test\n");

            Console.Write("Socket number?  ");
            var socket = int.Parse(Console.ReadLine());

            Console.Write("Channel number? ");
            var channel = int.Parse(Console.ReadLine());

            var board = new IO.Devices.ClickBoards.RemoteIO.ADAC.Board(socket);
            var outp  = board.GPIO(channel, IO.Interfaces.GPIO.Direction.Output);

            for (;;)
            {
                outp.state = !outp.state;
            }
        }
예제 #2
0
        static void Main()
        {
            Console.WriteLine("\nMikroelektronika ADAC Click ADC Input Test\n");

            Console.Write("Socket number?  ");
            var socket = int.Parse(Console.ReadLine());

            Console.Write("Channel number? ");
            var channel = int.Parse(Console.ReadLine());

            var board = new IO.Devices.ClickBoards.RemoteIO.ADAC.Board(socket);
            var inp   = board.ADC(channel);

            for (;;)
            {
                Console.WriteLine("Sample => " + inp.sample.ToString());
                System.Threading.Thread.Sleep(1000);
            }
        }
예제 #3
0
        static void Main()
        {
            Console.WriteLine("\nMikroelektronika ADAC Click DAC Output Test\n");

            Console.Write("Socket number?  ");
            var socket = int.Parse(Console.ReadLine());

            Console.Write("Channel number? ");
            var channel = int.Parse(Console.ReadLine());

            var board = new IO.Devices.ClickBoards.RemoteIO.ADAC.Board(socket);
            var outp  = board.DAC(channel);

            for (;;)
            {
                for (int s = 0; s < 4096; s++)
                {
                    outp.sample = s;
                }
            }
        }