Main Site Documentation

SoftwareI2C 4.3R5 G120 Read Error


The following method running on MF4.3R5 return 0 while it should be 0x13.
MF4.2R5 works well

 private int ReadByteFromRegister(int register)
                var writeBuffer = new byte[1];
                writeBuffer[0] = (byte)(register | 0x80);
                var readBuffer = new byte[1];
                if (_sensor.Write(writeBuffer, 0, 1) != writeBuffer.Length)
                    throw new Exception("IO Write error TCS3414");

                if (_sensor.Read(readBuffer, 0, 1) != readBuffer.Length)
                    throw new Exception("IO Read error TCS3414");
                return readBuffer[0];
                _sensor.WriteByte((byte) (register | 0x80));
                return _sensor.ReadByte();


Have you tried this method: ?


@ iamin - Thanks for the message. No, i didn’t tried that one, If i can find some time i will try… I have to move on so i stay with 4.2 for now