Can't call one particular function from Particle Web Interface

I have several functions on my Photon which I can call from the Particle Web Interface without problems. One seems to be refused and I don’t know why. I have declared it:

int DumpArray(String tcommand);
...
int RWline = D7;

then in setup() I have

	Particle.function("Dump EEPROM 3param", DumpArray);      
...
	pinMode(RWline, OUTPUT);    

which appears on the Web Interface.

in the main code I have

int DumpArray(String tcommand)  {
    // function to dump contents of 24LC1025 via USB. Max value of tcommand is 127.
    for (int d = 0; d < 5; d++) { 
        digitalWrite(RWline, HIGH);
        delay(100); 
        digitalWrite(RWline, LOW);
        delay(100); 
    }    
    return 33;
}

The function has been reduced to only flashing the LED until I can actually call it. I am at a loss. I have several other calls to functions from the Web Interface which respond with a result, but this one won’t. The Web Interface just sits there waiting for a response but none comes. My code is quite short and I’m positive the Photon isn’t too busy doing other things - it is just looping waiting for the next request from the Web Interface.

You should not have blanks in the function name
https://docs.particle.io/reference/device-os/firmware/photon/#particle-function-

3 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.