Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
Dim json As String = "{""coord"":{""lon"":2.82,""lat"":44.38},""weather"":[{""id"":804,""main"":""Clouds"",""description"":""overcast clouds"",""icon"":""04d""}],""base"":""stations"",""main"":{""temp"":15.21,""pressure"":1016,""humidity"":82,""temp_min"":15,""temp_max"":15.56},""visibility"":10000,""wind"":{""speed"":6.7,""deg"":290},""clouds"":{""all"":90},""dt"":1570022051,""sys"":{""type"":1,""id"":6480,""message"":0.006,""country"":""FR"",""sunrise"":1569995221,""sunset"":1570037352},""timezone"":7200,""id"":3008636,""name"":""Laissac"",""cod"":200}"
Dim humidity As Double = GetNumberValueFromKey(json, "humidity", 0)
Dim temperature As Double = GetNumberValueFromKey(json, "temp", 0)
Log("humidity: ", humidity)
Log("temperature: ", temperature)
Dim MaxLength As Int = 50
Dim buffer(MaxLength) As Byte
GetTextValueFromKey(json, "main", 0, buffer, MaxLength)
Log("Weather status: ", buffer)
GetTextValueFromKey(json, "description", LastIndex, buffer, MaxLength)
Log("Weather description: ", buffer)
End Sub