Sub astream_NewData (Buffer() As Byte)
Log(BytesToString(Buffer, 0, Buffer.Length, "utf8"))
' for testing
Dim bc As ByteConverter
bc.LittleEndian = True
Dim a As String = bc.HexFromBytes(Buffer)
Log("a = "&a&" len = "&Buffer.Length)
'
Dim s(4) As Byte
bc.ArrayCopy(Buffer,6,s,0,4)
Dim d() As Float = bc.FloatsFromBytes(s)
Dim str As String = d(0)
Dim dbl As Double = d(0)
Log("d = "&d(0))
Log("str = "&str)
Log ("ppm = "& str.SubString2(0,5))
Log ("dbl = "& NumberFormat(dbl,0,3))
lblPPM.Text = str.SubString2(0,5) - displays symbols instead of text