Can't use Due timer with Virtual wire libary


I used Duetimer.h in my code and it worked well.
Next I used VirtualWire.h successfully in another code with arduino Due.

Now I need both function together,
So I combined both, but seems like I can’t use both libraries together. seems like both use same variable or something, I don’t know.


I have run into this in another language too, but that has a way to deal with it if necessary.
I think with this language you would have to rename the variable in question in the offending library.

In the other language if you have file LibA and file LibB and you have a variable a, you would name one variable LibA_a and the other LibB_a or alternately LibA:a and LibB:a and that would take care of that.

In this language i guess you would have to use LibA_a and LibB_a. Of course you have the option to leave the first 'a' alone, so you would have just "a" and "LibB_a".
That is the "flat" way of doing it.

There may also be a way to do it with the dot convention such as LibA.a or LibB.a but i havent worked with this enough yet to be sure.

In any case, you should make a backup file of any files you intend to modify. You might also have to rename the files that get included so that they dont mess up your other programs when they have the new variable names, or you might put them in the same directory as your .ino file so that they only have effect on that one project .ino file.

Whenever we do something like this we have to think about the way our program uses the files and the way our other programs use them as well as any future programs might use them.

As a final note, there may be a convention for doing this already.