Particle.function not registered when using Particle Dev (but same code works with the web IDE)

Hi everyone!

I’m flashing the following code on a Photon. When doing it through the web IDE, the particle.function gets registered properly. When doing it from Particle Dev, the function doesn’t get registered. I’m properly logged in and can see and set the function through the “cloud functions” panel, but only if the code was flashed using the web IDE.

I suppose I’m doing something wrong somewhere. Any ideas?


int setSpeed(String newSpeed);

void setup()
   Particle.function("speed", setSpeed);

void loop()

int setSpeed(String newSpeed) {
    return 1;

Just to confirm you actually are working on the project you think you are, add some obvious error to your current sketch and build.
I’d guess you won’t get an error message, since you are acutally building another project than the one you are editing - others (including myself) got fooled by this behaviour of Dev before :wink:

1 Like