coffee-roaster icon indicating copy to clipboard operation
coffee-roaster copied to clipboard

Compilation errors in arduino 1.8.6

Open itglueguy opened this issue 7 years ago • 4 comments

Saw it had compilations issues relating to arduino 1.8.6. Use 1.8.5 as originally compiled in this sketch.

itglueguy avatar Dec 14 '18 06:12 itglueguy

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.

per1234 avatar Dec 15 '18 04:12 per1234

.... 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 avatar Dec 15 '18 06:12 itglueguy

@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.

lukeinator42 avatar Dec 18 '18 20:12 lukeinator42

I too have those warnings when I compiled it. I have downloaded this library https://github.com/smarmengol/Modbus-Master-Slave-for-Arduino.

uffvven avatar Jan 10 '19 15:01 uffvven