I have 3 Xenons with 1 Argon as the gateway over wifi.
I was thinking the same thing as RWB at first, but now I realize that the blinking cyan means “I can’t see the internet cloud but I can see the local mesh”.
So Tinker will not work because it is using Particle.publish. But the Mesh.publish is working fine in the blinking cyan state. Doesn’t make sense that if the mesh network is working then it should see the internet but maybe it’s a bug or limitation. Blinking cyan versus Breathing cyan seems to correspond to the NFC reception. It’s easier to get breathing cyan if you’re closer to the gateway (but no guarantee). Also, the frustrating thing is you can only flash the Xenon when it’s in the breathing cyan state and even that is hit or miss…I have to hit the reset button to interrupt the running program and force it to check in with the cloud. One feature request would be to enable the gateway Argon or Boron to send firmware updates to the Xenons using mesh network if that makes sense or even better, update all the Xenon’s at once via the mesh.
I made a simple “heartbeat” program on each Xenon like this:
String name = "test";
String message = System.deviceID();
int led = D7;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
//Send a mesh publish "test" with device id as message
Mesh.publish(name, message);
//Toggle the onboard led
digitalWrite(led, HIGH);
delay(2000);
digitalWrite(led, LOW);
delay(2000);
}
Then the Argon listens for the “test” event and then publishes it to the cloud:
//Event listener for "test" event from Xenons
void myHandler(const char *event, const char *data)
{
//Cast char*data to String class
String parse = data;
String id = parse.substring(0,24);
//Parse the device id's to the actual names
String name = "ERROR"
if(id.equals("put_your_device_id_here"))
name="ShyGuy";
else if (id.equals("put_your_device_id_here"))
name="Yoshi";
else if (id.equals("put_your_device_id_here"))
name="Goomba";
else if (id.equals("put_your_device_id_here"))
name="Toadette";
//Publish to the cloud.
Particle.publish(event, name + " says hello.");
}
void setup() {
Mesh.subscribe("test", myHandler);
}
void loop() {
}
This is working great with blinking cyans. It doesn’t work with blinking green which I think means “I am looking for the mesh but can’t find it” and the program doesn’t run until it can find the mesh.
I was even able to send Mesh.publish events at high speed like every 20 milliseconds from one Xenon to the Argon. The Argon would flash it’s onboard led when it got what I called the “fast” event and I was impressed that it would keep up (with the occasional hiccup). At the same time, the Argon still captured the “test” event emitted by the other Xenons every 4 seconds and then would “retweet” that to the cloud.
The NFC range that I’m seeing is around 15 feet like someone else posted but when you overlap the meshes, I was able to extend the network from one end off my house to the other…like 60 feet. But if I wanted to reflash a Xenon, I would have to move it close to the gate way to get the breathing cyan.
I’m starting to realize that this Mesh concept is probably better suited for very specific scenarios and for a hobbyist like me, I’m better off sticking to Photons and wifi. You can still use a bunch of Photons and communicated between them without using the cloud. Also, wifi range is awesome with the built in antenna in the Photon versus the Mesh range of 15ft. Yeah I know the Mesh can be extended and heal itself but it takes a long time for the Xenons to join the mesh (5-30 seconds) vs the Photon connecting to wifi. The only advantage I see is Xenon’s lower power requirements and the mesh network if you don’t have wifi.
But to be honest, I’m still trying to wrap my head around the Mesh concept and I’m having fun experimenting with this.