Sub Process_Globals
' Communication
Public Serial1 As Serial
' SHT20
Private sht As SHT20
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log(CRLF, "[AppStart]")
'Init the module
Dim result As Boolean = sht.Initialize()
If Not(result) Then
Log("[AppStart][ERROR] Can not init the SHT20. Check the wiring.")
Else
Dim result As Boolean = sht.Measure
Log("[Measure] result=",result)
Log("[Measure] t=",sht.Temperature,"h=",sht.Humidity,",d=",sht.Dewpoint(sht.Temperature,sht.Humidity))
End If
End Sub