private void ReadI2C() { byte[] cmd = new byte[1] { 0x04 }; byte[] buf5 = new byte[5]; SBHelper help = new SBHelper(); var sl = help.GetSenderLink("ReadI2C"); int m_bufSendThreshold = (m_buf1.Length * 3 / 4); //TODO: jeden bufor gromadzi, drugi jest wysyłany while (true) { i2cPCF8591.Write(cmd); i2cPCF8591.Read(buf5); //if (m_bufInd==1) { // if (m_buf1Pos> m_bufSendThreshold && !m_sending) { // //Send // } //} else if (m_bufInd==2) { //} m_count++; Message msg = new Message(buf5); sl.Send(msg); //{buf5[0]:D3} - to powtórka Debug.WriteLine($"{buf5[1]:D3} - {buf5[2]:D3} - {buf5[3]:D3} - {buf5[4]:D3}"); } }