C++ String Library

27 Jan 2011

I want to include the C++ string library but don't know how and where to get and do it.

Bill

27 Jan 2011

#include <string> should be enough.

28 Jan 2011

I did that but when I try to use cout it doesn't compile; or is cout in another library????

28 Jan 2011

What does not compile? Show us the code.

28 Jan 2011

P.S. cin and cout are in <iostream>.

28 Jan 2011

Found that I had to include <iostream>; now it compiles.

The project I'm building reads a xbee data stream and sends it to PACHUBE; I'm making progross but it's going slow. Do you have any easy code to read a xbee serial input??

Appreciate your quick responses; I gave up on ARDUINO and think mbed is the way to go.

Bill

28 Jan 2011

I got the xbee working OK now but I am having a problem getting the data posted to PACHUBE. The code I'm using is:

/media/uploads/williamlynn/pachube.txt

This code works fine as long as I put a number in "pachube.PutCsv("14671", "92.5");, in this case it is 92.5 and PACHUBE will display 92.5; but I want to use "data_2" such as "pachube.PutCsv("14671", "data_2"); so that the new value being sent from the xbee gets posted; actually I want to put "pachube.PutCsv("14671", "data_id", "data_1"); but I have to solve the first problem.

All my attempts have resulted in as no-go.

Any guidance appreciated.

Bill Lynn

31 Jan 2011

I found the solution; I converted the INT data with sprintf() and put the result into the PACHUBE PUT request without the quotes.

Things are working good; PACHUBE feed ID is 14671 if you want to see it.