Bcf-kit-sigfox-climate-monitor - data received


#1

Hello,
I succesfully uploaded firmware bcf-kit-sigfox-climate-monitor and I am receiving some data to sigfox backend.

But for me it looks that data received are a bit strange.

From firmware code i expect to receive 7 values:

buffer[1] = temperature;
buffer[2] = temperature >> 8;
buffer[3] = humidity;
buffer[4] = illuminance;
buffer[5] = illuminance >> 8;
buffer[6] = pressure;
buffer[7] = pressure >> 8;

In my API callback I have following:

data1::uint:8 data2::uint:8 data3::uint:8 data4::uint:8 data5::uint:8 data6::uint:8 data7::uint:8 data8::uint:8

If I check message I have there this:

GET https://api.thingspeak.com/update?api_key=xxxxxxxxxxxx&field1=15&field2=48&field3=0&field4=94&field5=0&field6=0&field7=179&field8=191 HTTP/1.0

I copied data here:

field1=15
field2=48
field3=0
field4=94
field5=0
field6=0
field7=179
field8=191

None of received data looks like what I expected (temperature, humidity, illuminance, pressure). What am I doing wrong? :slight_smile:


#2

HI,
because you used bad value format for decoding, uint:8 can use only for humidity, but other values is uint:16:little-endian. And if you look at the code, the values are multiplied or divided by an example:

float average;

int16_t temperature = 0;

if (bc_data_stream_get_average(&stream_thermometer, &average))
{
    header |= 0x01;

    temperature = average * 2;
}