MagunoLink and DUE

A place to just chat
Post Reply
eragonsmith
Posts: 2
Joined: Sun May 28, 2017 2:40 pm

Sun May 28, 2017 7:43 pm

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.
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Tue May 30, 2017 4:17 am

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
eragonsmith
Posts: 2
Joined: Sun May 28, 2017 2:40 pm

Sat Jun 03, 2017 6:46 pm

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.
Post Reply