         && evnt.opcode == SERIAL_EVT_OPCODE_CMD_RSP){
         state = ready;
         
+        // save the response value of SPI slave into buffer
+        // can be read via callback function
         lastResponse = evnt.params.cmd_rsp.response.val_get.data[0];
     }
     
-    Serial.print(state);
-    Serial.print("  ");
-    Serial.println(initState);
-}+    //Serial.print(state);
+    //Serial.print("  ");
+    //Serial.println(initState);
+}


aci_pins_t pins;

void setup(void)
{
  Serial.begin(9600);

    return rbc_mesh_value_set(handle, &value, (uint8_t) 1);
}

// callback function for http command to get a handle value
int get_val_req(String args){

    if(state != ready){
