Hi, sorry for my terrible english but I'm italian. I'm a student and i love Arduino
I would like to make this project but Messenger.h don't work. i would like to use CmdMessenger but i'm very confused. Any help please?
In any language, "but Messenger.h don't work" is pretty lame. You need to be much more specific. Is it causing a compile problem? Or, is it not working at run time?
Is that a surprise? You are including CmdMessenger.h, which defines a class called CmdMessenger, and then trying to create an instance of some undefined class called Messenger.
You might want to create an instance of CmdMessenger, instead. Just a thought.
I had a look at this and I must say, it baffles me (which is easily done). For one the example code that website gives is full of errors. I have attempted to fix the errors but was unsuccessful on some of them (trust me, there was a ton).
It is "Messenger" according to the library and the example code.
Messenger message;
But can't get it to compile myself. If someone that has more knowledge on libraries could look at it, they could tell you more.
Here's the compile errors:
sketch_oct31a.ino:4:2: error: invalid preprocessing directive #Define
sketch_oct31a.ino:5:2: error: invalid preprocessing directive #Define
sketch_oct31a.ino:6:2: error: invalid preprocessing directive #Define
sketch_oct31a:9: error: expected constructor, destructor, or type conversion before 'void'
sketch_oct31a:10: error: expected constructor, destructor, or type conversion before 'void'
sketch_oct31a:11: error: expected constructor, destructor, or type conversion before 'void'
sketch_oct31a:12: error: expected constructor, destructor, or type conversion before 'void'
sketch_oct31a:13: error: expected constructor, destructor, or type conversion before 'void'
sketch_oct31a:15: error: expected constructor, destructor, or type conversion before 'void'
sketch_oct31a:2: error: 'Messenger' does not name a type
sketch_oct31a:4: error: expected constructor, destructor, or type conversion before 'void'
First, it's #define, not #Define. That will get rid of the 1st three error messages.
Second, you have the function name in front of the type. That's completely backwards. There goes the next 6 messages.
Third, Messenger is obsolete. CmdMessenger replaces it. Trying to modify examples for obsolete classes is a waste of time. Doing so when you don't know what you are doing is even more so.