From 25b325034514f2b8939005899169e7773b716d4c Mon Sep 17 00:00:00 2001 From: peteGSX Date: Tue, 20 Dec 2022 07:08:42 +1000 Subject: [PATCH] Digital read working --- IO_EXIOExpander.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IO_EXIOExpander.h b/IO_EXIOExpander.h index 3641dfd..692e309 100644 --- a/IO_EXIOExpander.h +++ b/IO_EXIOExpander.h @@ -145,8 +145,8 @@ private: _digitalOutBuffer[0] = EXIORDD; _digitalOutBuffer[1] = pin; _digitalOutBuffer[2] = 0x00; // Don't need to use this for reading - int _value = I2CManager.read(_i2cAddress, _digitalInBuffer, 1, _digitalOutBuffer, 3, &_i2crb); - return _value; + I2CManager.read(_i2cAddress, _digitalInBuffer, 1, _digitalOutBuffer, 3, &_i2crb); + return _digitalInBuffer[0]; } void _write(VPIN vpin, int value) override {