Go Down

Topic: Data types difference 2560-Due (Read 19783 times) previous topic - next topic


I have a project written for ATMega 2560. I would like to adapt it for my Arduino Due.

My question is:
for data types there are differences from-for (eg: int 16bit --- 32bit).

If uint16_t was used from author in the sketch and in the library instead of "int", am I wrong or is there no more difference in use?

Thanks in advance



An uint16_t (2 bytes) is the same wathever the uc, this is why it's interesting to use it rather than just int.


Yeah, you confirm that it's just as I thought.

So, when converting a sketch from Uno, 2560 etc. a DUE, as regards the data types it is convenient to replace "Int", "double" etc. with uint_16t, uint_32t etc.

Ard...Thank you


Go Up