I am beginner to C#, could anyone help me?
I want to send code to my board
now I am using ModBus Poll application, with modeBus Poll i got this Ascii code :
3A 30 31 30 36 30 30 30 30 30 30 30 30 46 39 0D 0A
(include space)
I wrote this:
could anyone help me, i know code is wrong, so i need to know how to send ascii code in C#
byte[] _mass = Encoding.GetEncoding(“ASCII”).GetBytes(“3A30313036303030303030303146380D0Arn”);
serialPort1.Write(_mass, 0, _mass.Length);
ehsan Jahromi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.