Private RS485 As Pin
Private Send As Boolean = True
Private Recv As Boolean = False
.
.
.
'Tx Transmition Pin RS485
'Rx Recive Pin RS485
'Dir Dirction Pin RS485
'Buad Rate RS485
Public Sub Initial(Rx As Byte,Tx As Byte,Dir As Byte,BudeRate As ULong)
softserial.Initialize(BudeRate, Rx, Tx)
sstream.Initialize(softserial.Stream, "Sstream_newdata", Null)
RS485.Initialize(Dir,RS485.MODE_OUTPUT)
RS485.DigitalWrite(Recv)
End Sub