I am using Visual studio 2008 and I write to the serial port an array of objects via WriteFile API function.The problem I am facing is "how I can read this array in my arduinoBT for further process ?" ... I give you a simple example so you can undestand me :
I have the follow class :
class ValueClass
{
private:
int Value;
public:
void setValue(int aNumber){Value = aNumber}
int getValue(){return Value;}
}
As far as the Arduino is concerned, there's nothing to read: "Value" is private, and "setValue" and "getValue" are methods which would make no sense to Arduino.
I am filling an array of objects :
You're just instantiating an array of objects, surely?
Otherwise, the way you read an array is the same way you eat an elephant: one bite at a time.
First you need to make sure you know what the endianess of both parts of the transfer is.
If it's the same, then it's dead easy; if they're different, then it's very slightly less dead easy.
And make sure an "int" is the same size on both platforms...