Sketch gets uploaded with Nano but fails compilation with Due

Enclosed sketch gets compiled and works with Nano but fails compilation with Due, pl help

telemetryprg.ino (2.2 KB)

Can you link to where yo got the libraries ?
You have not given much to go on.

Maybe one of the libs is AVR specific ?

Nope not seeing link to the #include"Statistic.h" lib.
BTW that's just the first video he clearly states the whole thing has been updated in a second vid that he links to.

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 TAGS (</> button on the toolbar).

Arduino: 1.6.11 (Windows 10), Board: "Arduino Due (Native USB Port)"

Build options changed, rebuilding all
E:\Arduino\Telemetry Viewer\telemetryprg\telemetryprg.ino:2:44: fatal error: Statistic.h: No such file or directory

#include"Statistic.h"//for statistic memory

^

compilation terminated.

exit status 1
Error compiling for board Arduino Due (Native USB Port).

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

You are a LIBRARY missing pure and simple.

Instructions available below.

Go here and get it and with any luck it will be the correct version.

I take it you know how to install a library ?

BTW once you have it installed it will fail again.

It does seem to be AVR specific as I thought.

Arduino: 1.8.3 (Windows 7), Board: "Arduino Due (Native USB Port)"

In file included from D:\Sketches\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:35:0:

D:\Sketches\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp: In member function 'uint8_t LiquidCrystal_SR1W::clearSR()':

D:\Sketches\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);

                        ^

D:\Sketches\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; }

                                                                               ^

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

   fio_bit reg_val = *srRegister;

                      ^

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

    *srRegister = bit_high;

     ^

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

    *srRegister = bit_low;

     ^

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

   *srRegister = bit_high;

    ^

D:\Sketches\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp: In member function 'uint8_t LiquidCrystal_SR1W::loadSR(uint8_t)':

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

     fio_bit reg_val = *srRegister;

                        ^

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

     *srRegister = bit_low;

      ^

D:\Sketches\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 D:\Sketches\libraries\NewliquidCrystal\LiquidCrystal_SR1W.cpp:35:0:

D:\Sketches\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);

                          ^

D:\Sketches\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; }

                                                                               ^

D:\Sketches\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);

                           ^

D:\Sketches\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; }

                                                                                ^

exit status 1
Error compiling for board Arduino Due (Native USB Port).

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

Same errors on the programming port.

AVR specific means Due or the module, I've? simple example codes get uploaded successfully!

Telemetry gets loaded successfully with nano and uno

The DUE is NOT avr specific.

JIC you missed them here are the specs

Notice its an ARM processor and NOT an AVR processor.

Sort of think you may have taken on a bigger project than your skills in some regard.
We have all done that LOL

The Due is an ARM based board.

The Nano is an AVR based board.

Many libraries are specific to one architecture. In this case, in the file LiquidCrystal_SR1W.cpp (in NewLiquidCrystal library), they're doing AVR-specific stuff to make operations atomic (which I'm not even sure why they'd have to do for an I2C LCD!). Now, what is that file being pulled in by? I'm not really sure without the libraries in front of me....

I thought the basic LiquidCrystal_I2C library worked on the Due - it's such a common device to use...

What is LCD.h for, also? It looks like you're #including two different LCD libraries, but only using the LiquidCrystal_I2C one... I think you can gun the LCD.h include without impacting functionality, and it might be the one pulling in that other library.

no success tweaking LCD and i2c part of the codes, still getting the same error messages

If you stick to the DUE you might end up seeking an alternate lib as you will get to this point I suspect.

WARNING: library LiquidCrystal_I2C claims to run on (avr) architecture(s) and may be incompatible with your current board which runs on (sam) architecture(s).
Archiving built core (caching) in: d:\Users\Bob\AppData\Local\Temp\arduino_cache_818422\core\core_arduino_sam_arduino_due_x_14ee379403277693e27a5039eb67382a.a
Sketch uses 25300 bytes (4%) of program storage space. Maximum is 524288 bytes.

Hi - I'm looking for Statistic header file for Arduino Due, Statistic header files of Nano would not work on Due

To be honest, I do not see anything specific that could make it fail on a Due. But I might be wrong.

I checked the below library:

Edit:
If this is a follow up on Sketch gets uploaded with Nano but fails compilation with Due, the problem in that thread seems to be the LCD library and not the Statistic library.

//Edit
Removed previous edit after merge of threads.

@ramrada2002, do not cross-post. Threads merged. Thread removed.