Skip to content

Commit 1a1ea07

Browse files
committed
MAX_ANALOG_PINS_SUPPORTED increased to 16
1 parent 6883fcd commit 1a1ea07

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

examples/Telemetrix4Arduino/Telemetrix4Arduino.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ TwoWire *current_i2c_port;
522522

523523
// maximum number of pins supported
524524
#define MAX_DIGITAL_PINS_SUPPORTED 100
525-
#define MAX_ANALOG_PINS_SUPPORTED 15
525+
#define MAX_ANALOG_PINS_SUPPORTED 16
526526

527527

528528
// Analog input pin numbers are defined from
@@ -1003,7 +1003,11 @@ void i2c_read()
10031003
current_i2c_port->write((byte)the_register);
10041004
current_i2c_port->endTransmission(command_buffer[3]); // default = true
10051005
}
1006+
#ifdef ARDUINO_AVR_NANO_EVERY
1007+
current_i2c_port->requestFrom(address, (size_t)command_buffer[2]); // all bytes are returned in requestFrom
1008+
#else
10061009
current_i2c_port->requestFrom(address, command_buffer[2]); // all bytes are returned in requestFrom
1010+
#endif
10071011

10081012
// check to be sure correct number of bytes were returned by slave
10091013
if (command_buffer[2] < current_i2c_port->available())

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Telemetrix4Arduino
2-
version=5.3.3
2+
version=5.3.4
33
author=Alan Yorinks
44
maintainer=https://github.com/MrYsLab/
55
sentence=The server for the Telemetrix Project.

0 commit comments

Comments
 (0)