LMIC_f2sflt16, unknown event

Hello everyone, hope you are all doing well.
Currently doing a project in which we have to send data to TTN, we have been able to use the “Hello World” code available online and it worked. Now we are trying to send actual data (in this case humidity values), was trying to use LMIC_f2sflt16 because we found a sample code online but ever since we added that function, it started giving us “Unknown event”.

`float rHumidity = dht.readHumidity();
Serial.print("%RH ");
Serial.println(rHumidity);
// adjust for the f2sflt16 range (-1 to 1)
rHumidity = rHumidity / 100;

    // float -> int
    uint16_t payloadHumid = LMIC_f2sflt16(rHumidity);
    // int -> bytes
    byte humidLow = lowByte(payloadHumid);
    byte humidHigh = highByte(payloadHumid);
    payload[0] = humidLow;
    payload[1] = humidHigh;

    LMIC_setTxData2(1, payload, sizeof(payload)-1, 0);
    `

Any ideas?
Thank you in advance if you reply.

Rodrigo Oliveira

Sorry you’re having problems.

Please share the complete sketch. (I don’t see the declaration of payload[]).

Also please share where you see the unknown event message, and in what context (is it on the serial port? Is it in the TTN decoder? etc.).

Best regards,
–Terry