I wrote an application on visual studio 2008 c++ which reads .kml google earth saved path files chooses a COM port, baud rate and sends the number of points and latitude - longitude values as Strings to the board. Also wrote a sketch to read those Strings and save them in a class. I did the application some time ago when I was using an ArduinoBT but for memory reasons (my code is more than 16k) I'm now using an Arduino Uno.
Everything worked fine with the Bluetooth board, but not with Uno.
Is it that the Uno communicates with the PC through a USB cable, so I need to re-write the sketch to accept USB data packets or something?
Some applications have issues with COM port numbers greater than 9. There are some bizarre special characters that need to precede the name when the number is greater than 9.
Can you disable stuff to get the port number down to 9 or less? Bluetooth, most likely.
serialPort->Open();
serialPort->Write(Convert::ToString(string_PointsCounter->Length));
serialPort->Write(string_PointsCounter);
for (int i = 0;i<PointsCounter;i++)
{
serialPort->Write(Global::allCoords*->Latitude);*
_ serialPort->Write(Global::allCoords*->Longitude);_
_ }_
_ serialPort->Close();_
_[/quote]*_ You are aware, I hope, that opening the serial port resets the Arduino. Closing it does too. Unless you have modified the Arduino to not do this. I'd hazard a guess that you are jamming all the serial data out before the Arduino is ready to receive any data, and then resetting the Arduino.
The easiest way is to stick a larger value capacitor between gnd and the reset pin. I use a 10uF - works a treat. It has the effect of 'swallowing' the small ground pulse transferred by the 0.1uF auto reset capacitor and preventing the board from resetting. It avoids the current drain of holding it high with a resistor. too.