I want to convert an int to a byte[4] array using BCD.
The int in question will come from an device id and his needed to speak to an device via serialport.
Is there any pre-made function that does this or can you give me a simple way of doing this?
example:
int id= 29068082
would output:
byte[4]{0x82, 0x80, 0x06, 0x29};