1 of 1 people found this helpful
If you want to send 12 bytes of data, please prepare a buffer which size is greater than 12 at least.
uint8 buffer_IN; // salida de datos del ADC
The buffer is an array of 8-bit (uint8) data. So, it is not possible to store a 16-bit data into an element of the array. If you want to store a 16-bit data into the 8-bit array, two elements must be used at least.
buffer_IN = LO8(adcReading); buffer_IN = HI8(adcReading);
LO8() and HI8() are a MACRO to return LSB and MSB part of a 16-bit value.