UINT8_T ..... isn't this supposed to represent a byte?

Hi All,

I saw in someone's code for an 8X8 matrix that they were defining their row pins as follows:

UINT8_T RowPins [8] = {10, 11, 12, 13, A0, A1, A2, A3]

I thought that UINT8_T is for an integer type of variable. Howcome A0, A1, A2, A3, can be used in this variable type?

I also saw that UINT8_T and BYTE mean essentially the same thing, but then why define your row pins as a byte ?

Thanks,
Ron

Howcome A0, A1, A2, A3, can be used in this variable type?

Because they are #defined as numbers.

Try printing them and see.

Oh, I see.... I'll try it!
Thanks :slight_smile:

I don't know what UINT8_T is but uint8_t is the same as byte, and both are integer types.

ron_sk:
I also saw that UINT8_T and BYTE mean essentially the same thing, but then why define your row pins as a byte ?

I assume you mean, "why not?". 'byte' is an Arduino definition, not directly portable to other C environments, but 'uint8_t' is standard, so it is portable.