Is it possible to add processor for individual components of I2C packet with the latest API/FW? I've tried to do it in 1.2.5 version and got "the only available process is a counter" error.
No, the API does not support data splitting / offsets within the context of data processing. You would have to adjust your I2C read to only retrieve bytes 4 and 5.
ok, makes sense. So I will have to readout complete 12 bytes for logging and also read out specific bytes to implement the logic. But I would be able to have Math processor on those 2 bytes of I2C data to left-right shift them, correct?
The comparator is working nicely on 2 bytes short read out from I2C sensor with little endian notation. My other sensor is big endian and here I need to swap the bytes (see code below) before comparator.
In the swapped output the data.bytes()[0] always comes out zero.
I'm new to 3+ data processors so it might be I'm doing something wrong.
Thanks, again, Eric. Worked as expected. Comparator works, the only annoyance is that I can not cast it to Integer for printing in Log. Printing data directly gives me 4 bytes of data, but I can work with this.
Comments
buffer
component.