Program.cs 704 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO.Ports;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Threading;
  8. namespace FietsSimulator
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. string[] ports = SerialPort.GetPortNames();
  15. Console.WriteLine("Availabe Comports: \n" + String.Join(" \n", ports));
  16. Console.WriteLine("Enter Comport:");
  17. string port = Console.ReadLine();
  18. new FietsSimulator(port);
  19. Console.WriteLine("Started Simulator");
  20. while (true)
  21. {
  22. Thread.Sleep(10);
  23. }
  24. }
  25. }
  26. }