Setup function "not executed" (apparently)

Hi All,

Im writing a firmware for my photons; I noticed something strange (I know) … apparently the setup function is no executed.

My basic code is like this

void setup() {
   Serial.begin(9600);
   Serial.println("Setup");
   Particle.publish("Setup");
}

void loop() {
   Serial.println("Loop");
   Particle.publish("Loop");
   delay(5000);
}

I noticed that the serial messages on each loop is printed in my terminal and also the console at particle shows the published messages, but I can see the messages from the setup function.

It’s pretty simple, but I tried in 2 photons that usually works fine and my firmware begun as simple as that.

Would be any thing that I’m missing ?

Are you sure you’re not seeing “Setup” in the console when you run? I do see it when I try your code. As for the Serial.print, you may be missing that by how (and when) your serial monitor is starting up. If you use particle serial monitor --follow in your terminal program (before you start running), you should see that print out.

1 Like

I just removed the app and created a new one and its working. I dont know what was missing.

Thanks