Sub Process_Globals
Private VERSION As String = "rOneWireEx Basic v20260826"
' Communication
Public Serial1 As Serial
' Sensor Bus
Private WireBus As OneWireEx
Private BUS_PIN As Byte = 4
Private Address(8) As Byte
' Helper Tool
Private bc As ByteConverter
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log(CRLF, "[AppStart] ", VERSION)
' Init onewire bus pin
WireBus.Initialize(BUS_PIN)
' Search and read the connected device 64-bit address
WireBus.ResetSearch
If WireBus.ReadAddress(Address) Then
Log("[AppStart] address=", bc.HexFromBytes(Address), " type=", WireBus.GetDeviceTypeName(Address))
' Expected log: [AppStart] address=28330A9497040373 type=DS18B20
End If
End Sub