yun thinkspeak multifield

ciao a tutti ho un problema

yun con vari sensori che postano su thinkspeak

questo è lo sketch funzionante con 8 valori registrati correttamente su TS

#define ARRAY_SIZE           8


void setup() {
  Serial.begin(9600);
  Bridge.begin();
  Console.begin(); 
 
  
};

void postToThingSpeak(String key, float value[]) {
  Process p;
  String cmd = "curl --data \"key="+key;
  for (int i=0;i<ARRAY_SIZE;i++) {
    cmd = cmd + "&field"+ (i+1) + "=" + value[i];
  }
  cmd = cmd + "\" http://api.thingspeak.com/update";
  p.runShellCommand(cmd);
  Console.println(cmd);
  p.close();
}
 
void loop() {
  float vol[ARRAY_SIZE];
  int sensorValue = 1;
  int sensorValue2 = 2;
  vol[0]=(float)sensorValue;
  vol[1]=(float)sensorValue2;
  vol[2] = 3;
  vol[3] = 4;
  vol[4] = 3;
  vol[5] = 4;
  vol[6] = 3;
  vol[7] = 4;
  postToThingSpeak("api",vol);
  delay(2*60000);
}

quando inserisco questo nel mio sketch succede una cosa strana

-con array uguale a 4 mi posta correttamente i valori dei sensori su TS
(La seriale mostra : curl --data "key=apikey&field1=25.94&field2=2.00&field3=3.00&field4=4.00" http://api.thingspeak.com/update
)

  • con array uguale a 8 la seriale da schermata bianca

  • con array uguale a 5 nella seriale mi tronca la curl ( appare una stringa parziale manca la parte iniziale) quindi non posta nulla su TS

sembra che yun non abbia il tempo , memoria o altro.qualcuno puo aiutarmi?

HO RISOLTO DIVIDENDO LA TRASMISSIONE IN TRE RICHIESTE DI CURL CON DELAY DI 15 SEC CADAUNO.

GRAZIE DELL' AIUTO! :smiley: :smiley: ;D :stuck_out_tongue_closed_eyes: