stephane / modbusino

Small Modbus slave, RTU (serial) for Arduino
http://libmodbus.org
ISC License
143 stars 94 forks source link

Hello, I want to use the TX1RX1 of the Arduino Mega, what should I do? #21

Open cofop875 opened 2 years ago

cofop875 commented 2 years ago

I want to use the TX1RX1 of the Arduino Mega, what should I do?

cofop875 commented 2 years ago

This is my code, I want to use TX0 RX0 and TX1 RX1, both in one code How should I do?

include

ModbusinoSlave modbusino_slave(1); uint16_t tab_reg[10]; void setup() {

modbusino_slave.setup(115200);

}

void loop() {

tab_reg[0] = 0x1234;

modbusino_slave.loop(tab_reg, 10);

}