Calculate a variable in an array

gfvalvo:
Then why are they all 0x00 in the picture you posted?

well; they are variables and they will change according to the state of digital inputs. they can be either 0x40 or 0x0e. In the array I just put 0x00 because this way it makes more sense when I look at it.