ledongthuc / CustomSoftwareSerial

Alternative SoftwareSerial in Arduino. CustomSoftwareSerial library allow to configure and custom Parity Bit and Stop Bit.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

modbus and customSoftwareSerial

riker65 opened this issue · comments

Hi
wanted to use this with Modbus

but got an error

Did I miss anything:

C:\Users\xxx\Documents\Arduino\libraries\ModbusMaster\src/ModbusMaster.h:74:10: note: candidate: void ModbusMaster::begin(uint8_t, Stream&) void begin(uint8_t, Stream &serial); ^~~~~ C:\Users\xxx\Documents\Arduino\libraries\ModbusMaster\src/ModbusMaster.h:74:10: note: no known conversion for argument 2 from 'CustomSoftwareSerial*' to 'Stream&' exit status 1 no matching function for call to 'ModbusMaster::begin(int, CustomSoftwareSerial*&)'

defined:
SoftSer1->begin(9600, SERIAL_8N2); //custom software serial node.begin(1, SoftSer1);
Error:
`Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

...error: no matching function for call to 'ModbusMaster::begin(int, CustomSoftwareSerial*&)'

node.begin(1, SoftSer1);

C:\Users\xxx\Documents\Arduino\libraries\ModbusMaster\src/ModbusMaster.h:74:10: note: candidate: void ModbusMaster::begin(uint8_t, Stream&)

 void begin(uint8_t, Stream &serial);

      ^~~~~

C:\Users\xxx\Documents\Arduino\libraries\ModbusMaster\src/ModbusMaster.h:74:10: note: no known conversion for argument 2 from 'CustomSoftwareSerial*' to 'Stream&'

exit status 1

no matching function for call to 'ModbusMaster::begin(int, CustomSoftwareSerial*&)'

`