public static void root(Arduino a) { ard = a; //put code here. //ard.pauseDevice(); while (true) { Console.WriteLine(ard.ping().ToString()); } }
static void Main(string[] args) { string name; _handler += new EventHandler(Handler); SetConsoleCtrlHandler(_handler, true); string com; if (args.Length == 0) { Console.Write("Enter COM port (Press Enter for COM3): "); com = Console.ReadLine(); if (com == "") com = "COM3"; } else { com = args[0]; } Console.Write("Enter a name for your deivice: "); name = Console.ReadLine(); ard = new Arduino(COM: com, DeviceVersion: "Arduino Uno Rev.3", DeviceName: name); Root.root(ard); }