![]() ![]() String s = ascii.getString((byte)r) // here there is an error, it require an array byte and not a single byte I can edit the code as: public void StartRead()ĪSCIIEncoding ascii = new ASCIIEncoding() ![]() If I record everything as an array of byte, I have not the information about start and the end of the array. MyBuff = ((unsigned char)(myRead & 0x00FF)) // Write LBĪnd this is the C# method that read from serial port public void StartRead()ĮDIT: I would as output an array of string that correspond to the data of Arduino output. How can I read these type of data with C#? As a consequence, if in my C# software I read the information with a "simple" ReadLine(), the data are incomprehensible. Anyway, in the Arduino code (that I can not modify) is used Serial.write() instead of Serial.print() in order to print a buffer of char. I have an Arduino that send on serial port some information revealed by analogical pin.
0 Comments
Leave a Reply. |