Compilation errors in arduino 1.8.6
Saw it had compilations issues relating to arduino 1.8.6. Use 1.8.5 as originally compiled in this sketch.
When you encounter an error you'll see a button on the right side of the orange bar "Copy error messages". Click that button. Paste the error in a message here using code fencing.
.... Arduino: 1.8.6 (Windows 10), Board: "Arduino/Genuino Uno"
coffe_roaster:9:51: error: narrowing conversion of '-1' from 'int' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1 };
^
C:\Users\nguyentadmin\Desktop\coffe_roaster\coffe_roaster.ino: In function 'void setup()':
C:\Users\nguyentadmin\Desktop\coffe_roaster\coffe_roaster.ino:35:34: warning: invalid conversion from 'int' to 'SoftwareSerial*' [-fpermissive]
slave.begin( 19200, SERIAL_8E1 ); // 19200 baud, 8-bits, even, 1-bit stop
^
In file included from C:\Users\nguyentadmin\Desktop\coffe_roaster\coffe_roaster.ino:5:0:
C:\Users\nguyentadmin\Documents\Arduino\libraries\Modbus-Master-Slave-for-Arduino-master/ModbusRtu.h:346:6: note: initializing argument 1 of 'void Modbus::begin(SoftwareSerial*, long int)'
void Modbus::begin(SoftwareSerial *sPort, long u32speed)
^
exit status 1 narrowing conversion of '-1' from 'int' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. ....
@itglueguy are you using this library: https://github.com/smarmengol/Modbus-Master-Slave-for-Arduino? I realize I hadn't updated the link in the project readme.
I too have those warnings when I compiled it. I have downloaded this library https://github.com/smarmengol/Modbus-Master-Slave-for-Arduino.