Skip to content
This repository was archived by the owner on Sep 13, 2020. It is now read-only.
This repository was archived by the owner on Sep 13, 2020. It is now read-only.

Cloud function not getting executed in loop #58

@abhirocks550

Description

@abhirocks550

I have created cloud function using Parse.com Javascript SDK and i am calling those functions from Arduino.Following is code for function hello

Parse.Cloud.define("hello", function(request, response) {
response.success("This is hello function");
}); //hello function Block

I am calling this function from Arduino side using following code.

void setup() {

 Bridge.begin();
 Serial.begin(9600);

 while(!Serial);

 Parse.begin("***zE0uUjQkMa7nj5D5BALvzegzfyVNSG22BD***", "***Ssggp5JgMFmSHfloewW5oixlM5ibt9LBSE***"); 
      //commented my keys with * here only

 // In this example, we associate this device with a pre-generated installation
 Parse.getInstallationId();
 Parse.startPushService();

}

void loop() {

      Serial.println("Start loop");
      demoBasic("meeting",0);

}

void demoBasic(String functionname,int light){

  char fnname[11];
  functionname.toCharArray(fnname,11);

 Serial.print("In ");
 Serial.print(functionname);
 Serial.println(" Function");


 ParseCloudFunction cloudFunction;
 cloudFunction.setFunctionName(fnname);
 cloudFunction.add("light_sensor", light);
 cloudFunction.add("value", "Arduino Hello");//parameters

 ParseResponse response = cloudFunction.send();
 Serial.println(response.getJSONBody());

}//function block for demoBasic

Problem is that i am getting response 8 times only after that whole program flow gets blocked.What is the problem,can somebody help please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions