Can you explain how i2c commands are formed?

In this example:

we are preparing a command for the i2c, in the shape of “[]byte{CommandDHTRead, pin, 0, 0}”. Why do we need these for values in bytes there? What is the i2c bus using that for?

Hi @LuCavallin,

I2C protocol sends data byte after byte, so it kind of makes sense to group them as a byte array, doesn’t it? I’m assuming you’re talking about why we’re using bytes instead of just using a list or something, right?