Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modbus and customSoftwareSerial #12

Open
riker65 opened this issue Jan 30, 2021 · 0 comments
Open

modbus and customSoftwareSerial #12

riker65 opened this issue Jan 30, 2021 · 0 comments

Comments

@riker65
Copy link

riker65 commented Jan 30, 2021

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*&)'

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant