Miky:
sorry I explained to you badly, I wanted to know if i can send a single bit instead of a single byte and as far possible?however the problem remains, how can i send the matrix data?
for example
byte long stepsMatrix[3][6] = {
{1, 10, 15, 000, 000, 000},
{2, 34, 10, 000, 000, 000},
{3, 50, 17, 000, 000, 000},{1, 20, 10, 000, 000, 000},
{2, 36, 15, 000, 000, 000},
{3, 100, 12, 000, 000, 000},{1, 30, 15, 000, 000, 000},
{2, 2048, 10, 000, 000, 000},
{3, 150, 15, 000, 000, 000},};
i want send the 10, 20 and 30, how can i do?
thank you
No, you can not send a single bit. Look up the I2C specification, it deals with bytes. The 10,20,and 30 are all less than 255. On the other hand, 2048 will not fit.
But 2048 can be split into two bytes. It is 0x800, so you can send 0x08 0x00 and reassemble it on the other end.
The "byte long" type you've invented is fishy. I doubt that it is what you think it is. Does it even compile? "byte" is defined as "unsigned char" so you have a "unsigned char long".