input = sp1.GetInputStream
Dim buffer(1024) As Byte
Dim count As Int
count = input.BytesAvailable
Log(count) - always zero here for some reason?
count = input.ReadBytes(buffer, 0, buffer.length) - hangs here forever if I unplug the serial port (not the USB), so there's no data.
If count > 0 Then
Main.read_knife_adjust_byte = buffer(count-1)
Main.knife_adjust_board_installed = True
End If