// Method // public static bool Init() { Log.Module = Module; if (!_connected) { if (RoBoIO.i2c_Initialize(RoBoIO.I2CIRQ_DISABLE)) { _connected = true; RoBoIO.i2c0_SetSpeed(RoBoIO.I2CMODE_FAST, i2c_clock); Log.WriteLineSucces("Opening: I2C lib"); return(true); } _connected = false; Log.WriteLineFail("Opening: I2C lib"); Log.WriteLineError(string.Format("I2C lib fails to initialize ({0})", RoBoIO_DotNet.RoBoIO.roboio_GetErrMsg())); return(false); } Log.WriteLineMessage("Opening: I2C lib...already open"); return(true); }