![]() ![]() We can not help you with other problems if you do not return to a normal Arduino build environment, because it might cause other (memory) problems. You have return to a reliable Arduino environment. If you changed a number from 32 to 128 or more, then please delete the Arduino files (not your project files), find the hidden "arduino15" folder and delete that and reinstall Arduino. Is this because of the way i use sizeof() ![]() If i just use 1 float variable in the struct the data seems to show up to the master correctly. Why if i make more than 5 variables in the struct is the data not received right? Serial.begin(9600) // start serial for output Wire.onRequest(requestEvent) // register event Wire.begin(2) // join i2c bus with address #2 Memcpy(&ts1, & messageBuffer, sizeof(ts1)) / strncpy (verifyStart, (char*)messageBuffer, 6) //6 bytes Wire.readBytes(messageBuffer, sizeof(ts1)) Wire.requestFrom(2, sizeof(ts1)) // request data from slave device #2 Serial.begin(115200) // start serial for output Wire.begin() // join i2c bus (address optional for master) My master is mega2560 and the slave is a arduino UNO if i add any more than 5 floats to the struct the received data is nan. If i delete a few variables from the struct i get the data as expected. ![]()
0 Comments
Leave a Reply. |