Hey everyone I am working with a difficult string coming in From a LoRa device via I2C and I need to split it apart into 5 different segments and them forward them off to Thingsboard …the partial code is below
snprintf(mqttPub, sizeof(mqttPub), "{\"ipstring\":%s}",ipstring);
Serial.println(mqttPub);
Particle.publish("Sensor_Data",mqttPub);
//===============
//Serial.println(mqttPub);
// Send payload
psClient.publish("v1/devices/me/telemetry", mqttPub); // Topic, payload
blinkLED();
//cnt=0;
//pub=1;
}
void serverConnect(void)
{
while (!psClient.connected())
{
Serial.println("serverConnect(): Attempting to connect to Thingsboard server");
if (psClient.connect("Photon", TOKEN, NULL)) // ClientID, User, PW
{
Serial.println("serverConnect(): Connected");
return;
}
else
Serial.println("serverConnect(): Connection failed, retry in 3 seconds");
delay(3000);
}
}