Gentlemen, I hope it is alright to express positive excitement in this forum. A number of you have provided amazing support for this old newbie. Thank you!
The company I work for has a professional programmer who does all our programming for the Particle Electrons, web sites, microprocessors, mobile apps etc. that we use. I do the hardware, he does the software. This is personally my first entry into the particle programming world. I did not know what publish or subscribe was, and barely how to do anything in this modern programming world. However, with your support I now have two xenons communicating with one another through the subscribe and publish examples provided in the IDE. It is truly amazing! Again, thank you. I am so excited that I am going to go upstairs and give my wife a big hug and kiss. After 47 years of being married to her, she is going to wonder what I am up to… I hope you can get a chuckle out of this. After all, you guys are helping real people meet their goals! I am grateful.
I had to change the “analogWrite(power,4095);” command to “analogWrite(power,255);”. I am learning that the programming examples provided in the IDE sometimes have to be modified to work on particular devices, and I have to check the reference documentation. After doing this, and building a voltage divider for the photo-resistor sensor in the example, my “Publish and Subscribe with Photoresistors” example worked great!
Moving ahead with the next question: I tried to change the particle.publish and particle.subscribe commands to mesh.publish and mesh.subscribe. I assumed the code would run the same, but without sending the data to the cloud. I got an error that said “mesh” is not declared in this scope.
Is this because the mesh.publish and mesh.subscribe are not yet supported in the online IDE? Can you explain the situation for me please?