Hi,
If I want sending data through serial port, when data type was string; I will use from this code in c#: port. Write (string name)
But, if data type was byte, what code should I use in c# language?
Please guide me?
Best Regards
You can still use the Write function. There are three overloaded Write functions. For writing bytes to serial port, you have to declare an array for storing the bytes you want to write. For example:
serialPort.Write(writeData, 0, 1);
where writeData is an array in byte, the second argument indicates from which element of the array you want to start with, the last argumebt indicates how many bytes to write.