Hey guys
As I said Getting Started Using MQTT
I need to send the temperature of the esp8266 to my app It's giving an error
here is the snippet of my code.
Thank you already
As I said Getting Started Using MQTT
I need to send the temperature of the esp8266 to my app It's giving an error
here is the snippet of my code.
Thank you already
B4R:
Sub mqtt_publish(Topic As String,msg As String)
If connected=True Then
mqtt.Publish(Topic,msg.GetBytes)
Else
Log("Publishg, ERROR ! MQTT Not Connected")
End If
End Sub
Sub Temp
Dim TempESP32 As String = 23 'Graus teste
mqtt_publish("temperature/",TempESP32)
End Sub
B4A:
Sub mqtt_MessageArrived(Topic As String, payload()As Byte)
Dim obj As Object = serializator.ConvertBytesToObject(payload)
EditText1.Text=obj
End Sub