Pages: [1]   Go Down
Author Topic: Programming Question... / Help with Messenger function...  (Read 834 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guys i've been following this build here to make a digital color organ... http://makeprojects.com/Project/Digital-LED-Color-Organ/424/1 
I've been following these instructions: http://makeprojects.com/pdf/make/guide_424_en.pdf
I am using the arduino code and the library from the links supplied in that pdf.... 

 
My arduino connects just fine, I have tried importing both the messenger library from the link in the pdf and the cmd messenger library (here:  http://arduino.cc/playground/Code/CmdMessenger), but either way i'm still having the same trouble with uploading the code as it states: "messenger" does not name a type.  And highlights this portion of code near the top that reads: Messenger message = Messenger();
Could someone help me resolve this issue... i'm not much of a programmer, more of a circuitry/ electronics guy... so keeping any instructions in very basic form would be appreciated.  Thanks Guys.
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 551
Posts: 46227
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have tried importing both the messenger library from the link in the pdf and the cmd messenger library
What did you do with them after "importing" them?

Quote
i'm still having the same trouble with uploading the code as it states: "messenger" does not name a type.  And highlights this portion of code near the top that reads: Messenger message = Messenger();
Posting your code and the EXACT error message is going to be necessary. The code says that Messenger is a type. The error message that you described says that messenger is not a type. The case does not match, so either the code snippet is not what is in the code or the error message is not exactly what is displayed.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks for the quick response... here is a screenshot of the error... http://s164.photobucket.com/albums/u36/1dyoung/?action=view&current=UntitledError-1.png

Additionally here is what i am guessing to be the complete error message... its the orange text in the black box down below...
"StereoColorOrganReceiver.cpp:2:23: error: Messenger.h: No such file or directory
StereoColorOrganReceiver:34: error: 'Messenger' does not name a type
StereoColorOrganReceiver.cpp: In function 'void setup()':
StereoColorOrganReceiver:71: error: 'message' was not declared in this scope
StereoColorOrganReceiver.cpp: In function 'void loop()':
StereoColorOrganReceiver:79: error: 'message' was not declared in this scope
StereoColorOrganReceiver.cpp: In function 'void messageReady()':
StereoColorOrganReceiver:86: error: 'message' was not declared in this scope"

As for the libraries... from what I've read they take effect simply by importing them... and that the little #include < > thing indicated that they were indeed in use... is this incorrect??
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 551
Posts: 46227
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The first message tells you that your assumption is wrong. Yes, you are trying to include the library, but it is not in the correct place for the IDE to find it. You must correct that problem first.

Have you even downloaded the Messenger library?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Where is the correct place for the library to be for the "IDE" (not sure what that is) to find it.  I do not simply import the library?  And yes i have downloaded the Messenger library... i wouldn't have had anything to import if i hadn't.
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 551
Posts: 46227
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
i wouldn't have had anything to import if i hadn't.
If you are able to use Sketch + Import Library... and see the Messenger library in the list, the library is installed in the correct location.

If not, then it isn't.

The fact the the IDE (interactive development environment) tells you that it can't find Messenger.h tells me that you do not have the library in the right place.

Exactly where it belongs depends on your operating system, which I don't see that you have revealed.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i can see the messenger library under the list of libraries to chose from when importing a library... ??? That seems to go with what you are saying is a correct location though...
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 167
Safety first.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Let me guess, you downloaded the messenger library, extracted it, and placed it inside:

\Arduino-0022\libraries

Well, more work needs to be done. The Messenger file is NOT the library you want to place inside.
Messenger.h: No such file or directory
Tells me that the Arduino cannot find it because its hidden under piles of folders.

So instead of
\Arduino-0022\libraries\messenger\firmware\Messenger\Messenger.h

Take the important folder called Messenger from inside the messenger folder and place THAT inside your libraries. Everything else in the messenger folder is just useful tools the author included, but it's in the way of the compiler.

It should now look like this
\Arduino-0022\libraries\Messenger\Messenger.h
\Arduino-0022\libraries\Messenger\Messenger.cpp
\Arduino-0022\libraries\Messenger\keywords.txt
\Arduino-0022\libraries\Messenger\examples\...etc

Hope that helps.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That worked! thanks guy. 
Logged

Pages: [1]   Go Up
Jump to: