Program.cs 732 B

12345678910111213141516171819202122232425262728293031
  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. //show available ports
  15. Console.WriteLine("Availabe Comports: \n" + String.Join(" \n", SerialPort.GetPortNames()));
  16. //ask for port
  17. Console.WriteLine("Enter Comport:");
  18. //start simulator on entered port
  19. new FietsSimulator(Console.ReadLine());
  20. Console.WriteLine("Started Simulator");
  21. while (true)
  22. Thread.Sleep(10);
  23. }
  24. }
  25. }