I don't really understand how to send float with the TD_SIGFOX_Send method.
I understood that a sigfox frame is composed with 22 digit hex byte (maximum).
If would like to know how to send for example two float and an integer.
I think i'm close and so far at once
Here are the steps i did :
1. Declared the frame
uint8_t sigfox_frame[12];
2. Created a structure like this
typedef struct sigfox_Frame_content {
float myFloat1;
float myFloat2;
int myInteger;
} sigfox_Frame_content;
3. Populated my structure with some values :
sigfox_Frame_content sigfox_message = {
.myFloat1 = 10.0023,
.myFloat2= 2.2424,
.myInteger= 8
};
4. This is the step unclear for me : now i have to populate my sigfox_frame with the two float and the integer before sending with TD_SIGFOX_Send(sigfox_frame, 12, 2);
i think each float will represent 4 byte and the int 4 too, so the frame should be full.
But... how ?
I if understand the principle, i should have :
sigfox_frame[0] = two hex digit from myFloat1
sigfox_frame[1] = two hex digit from myFloat1
sigfox_frame[2] = two hex digit from myFloat1
sigfox_frame[3] = two hex digit from myFloat1
sigfox_frame[4] = two hex digit from myFloat2
sigfox_frame[5] = two hex digit from myFloat2
sigfox_frame[6] = two hex digit from myFloat2
sigfox_frame[7] = two hex digit from myFloat2
sigfox_frame[8] = two hex digit for myInteger
sigfox_frame[9] = two hex digit for myInteger
sigfox_frame[10] = two hex digit for myInteger
sigfox_frame[11] = two hex digit for myInteger
Thanks.
Arnaud.