3 Replies Latest reply on Feb 3, 2016 5:49 PM by CMata_Intel

    Who can help me to translate Arduino I2C code to mraa I2C code.

    ToneLiu

      I am confusing about my arduino I2C code, because I want to change it to mraa I2C code. I am not familiar  with mraa I2C function. I just want to connect and communicate with my atmega8  chip. Because I want to read the analog sensor value. The following is the arduino code.

          Wire.begin();       

          Wire.beginTransmission(4);

        Wire.write(0x55);

        Wire.write(0xaa);

          Wire.write(cmd);       

          Wire.write(value);

        Wire.write((unsigned char)(0x55+0xaa+cmd+value));

          Wire.endTransmission();  

      I don't know what the appropriate mraa code is. I hope someone who can help me. I will really appreciate him.