Page 1 of 1

MagunoLink and DUE

Posted: Sun May 28, 2017 7:43 pm
by eragonsmith
Hi,

I am thinking, now evaluating, in using MegunoLink for my projects. The problem is that I am using can bus data and a DUE board. It seems this library and DUE are incompatible. The use of command handler works properly but not the variables. This line in blink2 demo program : " SerialCommandHandler.AddVariable(F("OnTime"), OnTime);" doesn't work when compiling for DUE device.

The proble after compilation is in bool AddVariable(const __FlashStringHelper *pName, uint8_t &rVariable);

Please do you now is there is any solution?

thank you very much in advance.

Re: MagunoLink and DUE

Posted: Tue May 30, 2017 4:17 am
by philr
Hi, it looks like for the due an "int" is not the same as a "int16_t" which it is for the normal Arduinos.

I think you should be able to change
int OnTime = 10; // Amount of time the LED remains on [milliseconds]
int OffTime = 100; // Amount of time the LED remains off [milliseconds]

to
int16_t OnTime = 10; // Amount of time the LED remains on [milliseconds]
int16_t OffTime = 100; // Amount of time the LED remains off [milliseconds]

and it should work again.
Cheers
Phil

Re: MagunoLink and DUE

Posted: Sat Jun 03, 2017 6:46 pm
by eragonsmith
Thank you very much philr. Now it compiles. I have not my arduino due boards as I am moving. Sure it will work as it compiles now.