Cannot get Behavior Library to work

Hello,

I seem to be having a lot of trouble with the Behavior library( http://playground.arduino.cc/Code/Behavior ) I have downloaded all three files, added them to a folder , zip the folder and added it to the library through the IDE.

When I try and verify it gave me an error saying i was missing wiring.h. I added that. But every time it was something new missing and this went on for about over 20 different things saying I needed after I added one thing and another thing was needed. I can not find a tutorial or and example of someone using this library. Can any one point me in the right direction. Either a tutorial or an existing project would be a great help.

Thanks for any help or advice! :slight_smile:

I can not find a tutorial or and example of someone using this library.

As a result, you concluded that the library is not working. I fail to see how you reached that conclusion.

Why do you think you need to use the Behavior library?

My conclusion wasn't that its not working just that I don't know what I am doing wrong. That's why I am looking for a tutorial or an example.

I am very new with using the Arduino. I have programmed with MindStroms before and there was also a behavior class. The documentation on Arduino site seemed to be the same type of class.

I would like to use this library so I can program a robot with different behaviors based on the information it receives from the sensors and with the behaviors I can prioritize which behavior have more importance.

My conclusion wasn’t that its not working

Read your thread title, again, then.

I was trying to get the title short.

Mdukes00:
I was trying to get the title short.

That’s a better title. You have some code that uses the library? If so, post it. If not, explain what you think the code should do, and why you think the Behavior class is necessary to make the Arduino do that.

If you do have code, you expect it to do something. You need to describe what you expect it to do, and how that differs from what it actually does.

I have not been able to get the library to work, so I have not been able to write any code that uses it.

I would expect that when I get a library from arduino that when i include it and click verify that it will compile and not be missing many more files.

I would ask you to try and get the behavior library and try it and see if you get the same results. Then maybe you will understand my frustration.

I have not been able to get the library to work, so I have not been able to write any code that uses it.

You still have that ass-backwords. You can not possibly know that the library does, or does not, work, until you have written some code.

I would expect that when I get a library from arduino that when i include it and click verify that it will compile and not be missing many more files.

That is a very old library. The only file that the source file includes, besides the header file that you downloaded is wiring.h, which was replaced by Arduino.h several years ago.

No, I still think you are miss understanding my problem. But in a way it is not working. If I can not take the library from arduino and include it in my solution. Then I choose to verify the code and it doesn't compile then its not working.

There is no more documentation on the page saying these files are dependent on anything else. So how am I to know what else is needed and what is our of date.

I am very new to arduino so I have no idea what was replaced several years ago.

So should I assume this behavior library is out dated and has been replaced with something new ?

So should I assume this behavior library is out dated and has been replaced with something new ?

Yes, and no. The library is old, and has not been maintained. To me, this suggests that the library never got much use, and no one bothered to keep it up to date. That there are no examples also suggests a "here it is, I'm not responsible, use at your own risk" attitude on the part of the developer.

However, replacing wiring.h with Arduino.h, while not necessarily obvious, will correct the problem with that missing include file.

That you get some compile errors suggests that you do have some code, even if it is nothing more than:

#include "Behavior.h"

void setup()
{
}

void loop()
{
}

So, when we say post your code AND your error messages, we mean just that. Even if the code doesn't really do anything.

"Not working" is not the same as "not compiling". Not working means that, even though the code compiled, it does not do what it is supposed to do (which is not the same as not doing what you expect).

I am very new to arduino

Then, this is NOT a library that you should be trying to use.