Photon with intermittent connection


I have tried carefully your changes but it has not worked correctly yet. Do you have any other suggestions?




Have you checked the serial output (as I mentioned earlier already)?
Maybe that provides some clue.

As I said, without the hardware I can’t really test the code myself.


Sorry for my ignorance, but What do you mean exactly with; check the serial output? What to do exactly?




You have a bunch of Serial.print statements all over the code which gives feedback of the state of the code via the USB serial connection.

You just need any serial monitor program on your computer, open the respective port and watch what’s coming from the device.

One option is

particle serial monitor --follow


Ok, I will check this, but supposing for a moment that this is the problem, would not be reasonable doesn’t work in any situation?..for example with the wrong lib…



Looking at the serial output is not a cure but should provide you with some more insight about where the issue may be coming from.


Ok, I will put my focus in this suggestion…
Thank you for now…



I have tried evaluate the serial output but I just get: No serial port identified
I have used Serial Monitor and I have applied with other projects with good results. Specifically in this setup does not work. I don`t know What is happening…




I have noticed one typo in the code I sent you back then.
Line 54 should actually be

  if (millis() - msLastPublish > 1000 && Particle.connected()) {

However, do you see the device connected on your machine at all?


what program is this? The term isn’t really that unique.

Additionally even if this program worked in the past, have you tried it with a simple test sketch now?


For some reason that I do not know, this assembly does not recognize serial exit with any of the sketches elaborated so far. I tried to use (particle serial monitor) and serial monitor of Particle Dev and still, the Arduino serial monitor. Any of these systems provide the same indication as: No serial port identified

Your last suggestion to change line 54 did not work either.

There is a connection to the Internet but the transmitted data is erratic. All concentrations are fixed at 1.00 ppm all the time as shown by the last image I sent weeks ago. Under these conditions, it looks like the connection is good but the device does not actually measure the gas concentration.

Thank you for your patience,



IIRC, the wrong readings where one of the reasons why I suggested you’d need to look at the serial output in order to locate the portion of the library code that might be causing that trouble.

So for any and all projects you plan on working on you should get serial output up and running as it will be your primary means of investigating why and what’s going wrong in your code does happen to misbehave - and there is always something going wrong :wink:

However, since I’m not a MacOS user, I can’t really be much help if there is something off with the setup there, but you can always try to change USB port and cable to see if that changes something.
Also try to find out whether your computer can see the device at all.


Yes, I understand you perfectly…

When I type: particle list, my device is listed correctly, but when I type: particle serial monitor, I have No serial port identified.




particel list only inquires at the cloud what devices you have registered to your accound, but it doesn’t look for devices connected via USB.

So the instructions still stand

You can also add the --port parameter to select a specific port (once you know at which the device is connected).


Yes, the connector support in Photon particle is broken. I will order another one.



Hey guys, sorry to resurect this from the dead, but, can you share wiring info?

I see from the code one pin is D7, what’s the other one? I tried D7 and D6 and reversing the pins, but I’m getting no output from the code that @ScruffR shared.


You mean the wiring for I2C sensors?
Then the docs are you friend

D7 is only used to provide visual feedback about some states in the code flow.


Ok, so connected with D0 and D1, but no output still, both in console and particle console.
I also have particle photon base groove shield, same there.
Either my sensor is not working or I need to update the firmware on the sensor.


Question: If I have the Photon Base shield, how does that reflect the code?There are D6, D4, D2, A4, A0, UART, I2C1 and I2C2 ports, so also not sure where to plug it in .


Don’t understand the question :confused:
What “Photon Base shield” are you refering to?
What plug in where?

There is only one I2C interface on the Photon, but as I2C is a bus you can have multiple I2C slaves on said bus.

After some googling I came across the Grove Base Shield for Photon
And here are the schematics for it

That should answer your questions.


Got it, thank you.
Seems like i’m doing everything right. Either the sensor is bad, or I need to update it.
Back to square one.