The reason of your problem is that you are using an Arduino library, even if you are using the Arduino expansion board for the Edison is not the same that an Arduino so your library is not working as it should be. You can try using Node.js.Take a look of these links, you will find interesting information:
New documentation is going to be available in the Software and Documentation section in the moment that the edition and revision processes finishes. You also could check in your PC the directories related to your IDE in order to know which libraries are available and how they work. The path it has to be something like this:
Another useful document is the Shields Report, in there you'll see some tests and results with different shields using Galileo and Edison Boards.
1 of 1 people found this helpful
Perhaps I can give some more specific information on what's going on with the PubSubClient library, as I've used it for demos, and have modified it to use on an Edison for my own needs.
It is NOT officially supported as of now on the Edison because the library, as it comes, contains a function specific to Arduino boards and their architecture. However, it is possible to compile sketches which use the library as long as the following is done.
-unzip the files into an appropriate library location
-Remove function called "publish_P" from the PubSubClient.h file
-Remove the function definition for "publish_P" from the PubSubClient.cpp file
Close and reopen the Arduino IDE to reload the changes, and your sketch using PubSubClient should now compile. Hopefully this will help. Of course, this type of change isn't going to work for all unsupported Arduino libraries, because many have functions which specifically reference the memory architecture of AVR microcontrollers, which do not work the same way an x86 does. If you don't need those particular functions, though, this hack might be useful.