diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp index 69d5e2a..7e1170d 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp @@ -97,7 +97,12 @@ void i2cInput(int bytesReceived) { value = Wire1.read(); #endif } else { + #ifdef __AVR_ATmega328PB__ value = value << 8 | Wire1.read(); + #endif + #ifdef __AVR_ATmega328P__ + value = value << 8 | Wire.read(); + #endif } }