I included the entire .ino file that I have on an Arduino Nano. It should reply to I2C requests from the master, an Uno, by sending the data contained in a variable length (roughly 75 byte) string. I occasionally receive the first 5 to 10 bytes on the Uno, but never the entire string of data. I have tried converting the string into a byte array but no improvement. I have tried pull-up resistors but no improvement. I have researched this for a few days now and I’ve looked at I2C posts on this forum, but still no luck.
I also included the Master code, since the problem might be there too.
I can do the Master Read, Slave Write example (sending Hello) and that does work.
I could use advice. Ultimately, I want to send this project up in a High Altitude Balloon. The slave unit will do all of the GPS and sensor reading, and the Master will control the radio and other tasks.
I2C_Master.ino (341 Bytes)