0

I'm sending an integer from arduino to visual studio C#. I use myport.ReadLine() to get the data from the arduino but it is blocking the rest of my program. Does anyone know how I can solve this problem?

kikidr
  • 1
  • async/thread. If this is a GUI program, don't make blocking calls in event-handlers. – Martin James Jun 01 '15 at 17:26
  • ReadLine is waiting for a newline character, which the arduino is likely not sending. Try some variation of ReadByte or ReadInt or whatever so it actually grabs the data instead of "give me all data until newline" – Russell Uhl Jun 01 '15 at 17:58
  • I get the correct data, but I have also other functionalities in my program with buttons etc, and since I added the arduino program the rest of my C# application doesn't work anymore – kikidr Jun 02 '15 at 06:41

0 Answers0