i2c on arduino and newliquidcrystal library.

Hi

I can compile example programs from newliquidcrystal library using an I2C on my Arduino Mega and my arduino uno but when I try to compile the same program on an arduino uno the compile craps out.

Any suggestions.

error report is

Arduino: 1.7.10 (Windows 7), Board: "Arduino Due (Programming Port)"

In file included from C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:35:0:

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp: In member function 'uint8_t LiquidCrystal_SR1W::clearSR()':

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:77:24: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')

SR1W_ATOMIC_WRITE_LOW(srRegister, srMask);

^

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.h:293:79: note: in definition of macro 'SR1W_ATOMIC_WRITE_LOW'

#define SR1W_ATOMIC_WRITE_LOW(reg, mask) ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *reg &= ~mask; }

^

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:86:22: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')

fio_bit reg_val = *srRegister;

^

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:95:5: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')

*srRegister = bit_high;

^

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:96:5: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')

*srRegister = bit_low;

^

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:101:4: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')

*srRegister = bit_high;

^

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp: In member function 'uint8_t LiquidCrystal_SR1W::loadSR(uint8_t)':

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:139:24: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')

fio_bit reg_val = *srRegister;

^

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:144:6: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')

*srRegister = bit_low;

^

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:145:6: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')

*srRegister = bit_high;

^

In file included from C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:35:0:

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:151:26: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')

SR1W_ATOMIC_WRITE_LOW(srRegister, srMask);

^

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.h:293:79: note: in definition of macro 'SR1W_ATOMIC_WRITE_LOW'

#define SR1W_ATOMIC_WRITE_LOW(reg, mask) ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *reg &= ~mask; }

^

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:158:27: error: invalid type argument of unary '*' (have 'fio_register {aka unsigned char}')

SR1W_ATOMIC_WRITE_HIGH(srRegister, srMask);

^

C:\Program Files\Arduino\libraries\NewliquidCrystal\LiquidCrystal_SR1W.h:294:80: note: in definition of macro 'SR1W_ATOMIC_WRITE_HIGH'

#define SR1W_ATOMIC_WRITE_HIGH(reg, mask) ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *reg |= mask; }

^

Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

I had the exact same problem.
Compiles and runs fine on both the Uno and Mega2560.

Switch to Due - and change nothing else except selecting the new com port, and I get the exact same compiler errors you do.

Apparently none of the Fmalpartida libraries are compatible with the Due.
The built-in LiquidCrystal libraries didn't work for me either.

I thought I'd found an answer here: http://forum.arduino.cc/index.php?topic=297219
but it still doesn't work even though it got rid of the compiler errors.

After hours of scouring the web looking for a solution, I finally found something that seems to work on the Due. It generates a compiler warning, but it seems to work.