Serial port on Android has a very short stop start time between two bytes . I have a problem that the microcontroller does not have time to recognize the stop bit of the byte just received from the start bit of the next. Is there any way to extend this time?
Sub konverzija (Value As Int)
outpkt(2)=0
outpkt(1)=0
outpkt(0)=0
Do Until (Value < 100)
Value = Value - 100
outpkt(2) = outpkt(2)+1
Loop
outpkt(2) =Bit.ShiftLeft(outpkt(2),4)
outpkt(2) = Bit. Or(outpkt(2),komanda)
sout.WriteBytes(outpkt,2,1)
sout.Flush
Do Until (Value < 10)
Value = Value - 10
outpkt(1) = outpkt(1)+1
Loop
outpkt(1) =Bit.ShiftLeft(outpkt(1),4)
outpkt(0) = Value
outpkt(0) = Bit. Or(outpkt(1),outpkt(0))
sout.WriteBytes(outpkt,0,1)
sout.Flush
Sub konverzija (Value As Int)
outpkt(2)=0
outpkt(1)=0
outpkt(0)=0
Do Until (Value < 100)
Value = Value - 100
outpkt(2) = outpkt(2)+1
Loop
outpkt(2) =Bit.ShiftLeft(outpkt(2),4)
outpkt(2) = Bit. Or(outpkt(2),komanda)
sout.WriteBytes(outpkt,2,1)
sout.Flush
Do Until (Value < 10)
Value = Value - 10
outpkt(1) = outpkt(1)+1
Loop
outpkt(1) =Bit.ShiftLeft(outpkt(1),4)
outpkt(0) = Value
outpkt(0) = Bit. Or(outpkt(1),outpkt(0))
sout.WriteBytes(outpkt,0,1)
sout.Flush