Can't get publish() to work properly

Here is the code:

int pot;

void setup() 
{
    pinMode(A0, OUTPUT);
}

void loop() 
{
    pot = analogRead(A0);
    if(Particle.connected())
        Particle.publish("Pot", (String)pot);
    else
        Particle.connect();
    Particle.process();
}

When I view it on the dashboard, it displays about five readings when it immediately starts up, but then it stops. I’ve tried it using just strings, but the same thing happens.

Screenshot of the data:

You’re publishing too fast. You can only send an average of 1 per second via publish. Putting in a delay(1010); at the end of your loop will make them go out at a constant rate.
https://docs.particle.io/reference/firmware/photon/#particle-publish-

Oh wow I’m stupid. It worked. Thank you very much. Do you mind explaining what the default TTL of 60 seconds is then? I thought that that meant it would only update the log every 60 seconds which is why I didn’t have a delay

The time-to-live, TTL, actually isn’t used for anything right now. The idea, however, works like this: when a program or device subscribes, right now it only get the future events. Once TTL is implemented, they would also get events that were published whose TTL hasn’t expired, so they’d get a window back in time as well.

Oh, okay that makes so much more sense. Thanks again!