The only problem I have is on the method were I upload the data:
void uploadData() {//Upload Data
Console.println("Call Linux Command to Send Data Wattabit");
Process proc; // Create a proce ss and call it "proc", this process will execute a Linux curl command
Console.print("Feedback from Linux: ");
// If there's output from Linux,
// send it out the Console:
while (proc.available()>0)
{
char c = proc.read();
Console.write((char)c);
It should work fine in c or c++. Whether the ide handles it correctly during display or preprocessing is a separate question. Can you be more specific about “not processed correctly”?
My problem falls on the use of curly brackets on the URL. This URL is intended to post information to a given data base and in case of success it returns TRUE.
The point is that every time I use these brackets to form a jason array the curl command is not generated correctly due to no response of the server is done.
I have also tried to send the hexa value of the brackets (%5B%7B%7D%5D ) but either not work.
If someone could provide and example curl command with curly brackets inside the URL and the proper atributtes used ( -g for example) it would be usefull for me.
I think your curly brackets (and perhaps other characters) are disappearing as a result of whatever shell is being used by "runShellCommand", rather than anything on the Arduino side.
properly quoting magic shell characters that need to make it to a program's actual argument is an art unto itself
try an extra set of quotes: