Go Down

Topic: Increase 32 byte I2C buffer size in Wire library (Read 4 times) previous topic - next topic

Nick Gammon

With my trusty Saleae Logic analyzer. It's great for situations like that. Not only can you time stuff but you see what is there. For example, when I first did it I had it as in my most recent example, and I looked at the logic output and thought "there are too many address bytes there" so I moved the beginTransmission out of the loop. That's the sort of thing you miss otherwise, because it seems to work anyway.

By the way, it's about 30 times as fast to use SPI, and then you don't have buffer issues because each byte goes individually. That's only two more wires.

mrnick1234567

That's interesting to know about SPI, I didn't realise it was quicker. I'll see how I do with the I2C stuff to start with.

Thanks for all your help,

Nick

Go Up