PaulS:
I want to assign result to variable which is coming from code below.
There is no variable coming from that code.
That code is sending data to the serial port.
So, try again. What variable do you want to assign a value to? Where is that value to come from?
Yes, but I dont want to send this data to serial port only.. I want send this data to serial port and assign this data to "MyData" variable. For example another part of this code I want to see this data in MyData variable if I call it again.