-2

I'm developing a motion detection sensor and I'm using a Processing application to implement rotations. Initially, a serial communication is established between an Arduino board connected to the PC and the Processing app. However, I'm not using arduino. I'm sending my sensor data through bluetooth to a dongle plugged into the PC and receiving the Data using a C# application. I was able to communicate with processing by dumping the data from C# into a file and reading it in Processing withut serial communication. Everything works great, but it is slow.

So I need to switch to serial communication. My idea was to write from C# to an empty COM port and read from it in Processing using the same Baud Rate, almost thesame what was happening between arduino and Processing.

However, I can write to the port BUt I can't read: I get an exception saying that the PORT IS BUSY.

ANy suggestions on how should I deal with this problem and establish decent serial communication, or how should I use virtual com POrts?

Thank you

joseph
  • 353
  • 3
  • 6
  • 10
  • 1
    There is no exception that ever uses all capitals like that. Fairly pointless to make us guess at the underlying problem with an inaccurate error message, no stack trace and no repro snippet. The typical dumb mistake you could make here is trying to open the port more than once. Once for reading, again for writing. That's an *access denied* exception, a serial port can only be opened once. – Hans Passant May 14 '14 at 23:58

1 Answers1

0

Try using other port. I don't know if it is possible, but for the processing use the COM1 and send by COM2 the processing data to C#. Just a vague idea.

aerojun
  • 1,206
  • 3
  • 15
  • 28