[SOLVED] Array of function?


I have many Virtualpin, each pin call one function, some another pin call many function
Each function I write with BLYNK_WRITE() code. Many function many BLYNK_WRITE() code line.
I think I can use BLYNK_WRITE_DEFAULT() with a for loop to compare pin.request with an array of virtualPin, and when compare = true, it with call a function in an array of function. Example:

array virtualpin[] = {V1, V2, V3, V4, V5, V6, V7};
array function[] = {f1, f2, f3, f4, f5, f6, f7};

  int pin = request.pin;
  for (int i = 0; i < sizeofarray; i++)
    if (pin == virtualpin[i])

But I don’t know how to create a array of function, I try to google but still don’t clear in my case, someone can help me? Sorry my bad English and my bad Program

I did it, I miss () after call function array.

1 Like