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.