Other Parts Discussed in Thread: CC3200
Hi All,
I am trying from past four days to transfer data from MSP432 to CC3200 by wiring up the I2C lines SDA and SCL
but I am unable to transfer data from the master due to data byte transfer timeout error, Could anyone please let me know the problem in my code.
#include <Wire.h>
const byte SLAVE_ADDRESS = 42;
const byte NUM_OF_BYTES_TO_BE_SENT = 5;
byte x, result = 0;
void setup()
{
Wire.begin();
Serial.begin(9600);
Wire.beginTransmission(SLAVE_ADDRESS);
Serial.print("Transmission begin....");
Serial.println("");
for(x = 1; x <= NUM_OF_BYTES_TO_BE_SENT; x++)
{
Wire.write(x);
Serial.print("writing - ");
Serial.print(x);
Serial.println("");
}
result = Wire.endTransmission();
if(!result)
{
Serial.print("Transmission Successful");
Serial.println("");
}
else
{
Serial.print("Transmission Failed");
Serial.println("");
Serial.print("As Wire.endTransmission returns a non-zero value i.e, - ");
Serial.print(result);
Serial.println("");
}
delay(200);
}
void loop()
{
//nothing in the main loop
}