Photon with intermittent connection


#22

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

Thanks,

Cesar


#23

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.


#24

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

Thanks,

Cesar


#25

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

#26

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…

Cesar


#27

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.


#28

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

Cesar


#29

ScruffR,
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…

Thanks,

Cesar


#30

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?

And

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?


#31

ScruffR,
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,

Cesar


#32

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.


#33

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.

Thanks

Cesar


#34

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).


#35

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

Cesar