(Reference) Particle Publish

Particle.publish

Operation

  • Events are messages sent from an Photon 2 to the cloud as often as you choose
  • Events can be accessed in Particle console, app, or by other devices (subscribing)

Viewing Events in Particle Console

1569446342143

Code

Syntax

Particle.publish(<<EVENT_NAME>>, <<EVENT_VALUE>>); 

Example

Particle.publish("lightValue", "bright"); 
Particle.publish("tempFahr", String(85.9));
  • Names and values must always be strings
  • Should only publish 1 event / sec (or burst of 4 events in 1 sec)

Documentation

Updated: