Photon Challenge (Breathing Green)

Particle,

I’ll take the best offer for both, I’ll pay shipping just to get these paperweights off my desk.

I’ve bought three photons, I’ve got two photon Green Breathing bricks.

I’ve been working with Harrison at Particle.io on two photons that just won’t come back to life. We were down in the weeds trying to fix them when communications from Particle Customer Support seems to have been broken off. I’ve been fighting this Breathing Green issue on two photons for 45 days now, working with Particle for over twenty+ days of them.

I very much like the usefulness of the photon product, I own three and planned on purchasing many, many more for future projects but I must get these two working now.

Is there any available help or have I been relegated to some type of “blacklist” by Harrison?

Your support would be appreciated.

Thank you

Lane

@zach @zachary @jeiden @jonlogan @will @BDub

Hey there @laf0138,

Thanks for reaching out, and sorry that your experience with these photons has been sub-par. Will you PM me the ticket number for your thread with Harrison? I’ll check in on things today and see where they stand so you can get a quick resolution to the problems you’re having.

Don’t worry, you haven’t been delegated to any black list, we’re simply in the process of ramping up our Technical Support staff to deal with increased email support volumes.

Breathing green indicates that the cloud connection has been blocked for more than 10 seconds.
Assuming you’ve got the latest/greatest CLI, could you hook one up in DFU mode and do particle update, followed by DFU mode once more and particle flash --usb tinker? Let me know if that helped?

Lane, I apologize for the delay on getting back to you. I did not mean to make you think I had blacklisted you! Let me know if the steps Will sent you don’t work. I’ve added an “urgent” tag to your ticket so it’ll “pop” when you reply.

@zach @zachary @jeiden @jonlogan @will @BDub

Thank you for your replies. I’m working with Harrison again to get to the bottom of these two.

@Moors7
My end goal is to get back to a fresh Tinker flash then start my sketch(s) again. I updated both Photons to the current firmware with the PSU as directed by @will . I went into DFU mode but I can’t reflash to Tinker with the Dashboard or the Android App so I’m not sure how to get back there.

Thanks again for your suggestion

LaneF

(still breathing green)

In DFU mode, neither of those two will work, as to be expected. The CLI however, should be able to work. Try this commands, if you will particle flash --usb tinker?
Can you get it into Safe Mode?

@Moors7,

Two part story:

I opened the terminal and tried the command string you mentioned, I got this...

Lanes-MacBook-Air:~ lanef$ particle flash --usb tinker
-bash: particle: command not found

Then, I put the Photon in Safe Mode, it was recognized by the Particle Android App and was successfully flashed to Tinker. I tested the LED on D7 and it works. GREAT !!! I have to admit, as I type this I keep glancing at the Photon expecting it to be breathing green. I'll cross my fingers.

Now I need to get the second one working. Right now it's still breathing green and failed the firmware update (twice). I also can't see the ID on my Dashboard or my Android Particle App anymore.

Not sure what to do with this one...

One down --- Thanks

LaneF

@harrisonhjones

So I can assume you haven’t got the CLI installed? It’s worthwhile installing that, you might need it.

The second one, can you get that into safe mode?

No, not quit....

I went to the Github page to install it, halfway down in the Mac section it said this:

Installing on Mac OS X:

Rather than installing these packages from source, and instead of using MacPorts, it is relatively straightforward to use Homebrew to install dfu-util and openssl. Once you have installed brew the basic command is brew install dfu-util openssl.

So, I have Homebrew loaded...can't get it to do anything but I followed the instructions and installed it. The command listed failed as well. Should I load CLI instead, regardless of those instructions?

LaneF

@harrisonhjones

You could try following this tutorial, it has been useful in the past:

Regardless of the CLI, can the second one get into Safe Mode? If so, try flashing Tinker that way?

1 Like

Not to compound problems but that photon is not on my “claimed” list anymore. Part of my failed attempt to get it working I "unclaimed " it. So, I need to get it claimed first, then I’ll try the Safe Mode maneuver.

All roads lead back to the CLI.

In reading @harrisonhjones comments on manually claiming, task #1 is… “load CLI”.

I’ll work on loading CLI then get back to you both.

(I’ll have to try in an hour or so, the Wife is yelling
"…stop playing with your Nerd-Box and let’s go to dinner" .
Gott’a keep the peace.)

Thanks
LaneF

1 Like

It's not my first rodeo, give me the benefit of doubt and try Safe Mode first ;)? You can't claim it when it's offline anyhow.
See if Safe Mode works. If it does, hold the MODE button for ten seconds until it starts blinking blue rapidly, after which it should go back to blinking blue slowly. Then, try providing it with credentials using the app. If things go according to plan, that should also let you reclaim it. If you provided it with credentials again, it'll most likely go back to breathing green. Don't worry. Put it in Safe Mode again, and then use the app to flash Tinker back, since it should be listed again.

Let me know is this works?

I held down the Setup button for 10 seconds, the light flashed blue fast then settled to a regular blue flash. The android particle app on the same WiFi doesn’t ever see it and allow me to reclaim it. It says (No Photon devices found).

LaneF

Quick update on the first Photon:

I uploaded a quick simple sketch to test it out. Everytime it reboots (after the upload or reset) it goes flashing blue for about 30sec then breathing green for 2min then breathing blue cyan, in and out of the two, resetting itself and finally stabilizing on breathing blue cyan.

I’m happy to thing it’s my code if you could find the problem. I know it violates all kinds of “elegance” in coding rules but let me know if you see something that would cause this.

Thanks LaneF

    // The Home Theater get's ripping hot in the summer, we tried to AC it but couldn't keep up, 
// so this year I'm sucking the heat out through vents in the ceiling, pulling in cool floor air from the 
//doorway.
    // This #include statement was automatically added by the Particle IDE.
        #include "PietteTech_DHT/PietteTech_DHT.h"
        
        // This #include statement was automatically added by the Particle IDE.
        #include "blynk/blynk.h"
        
        
        
        int projector = A3; // Projector 12Vdc trigger
        int sensorValue = 0;
        int fan = 2; // 6" in-line Duct fan, sucking air out
        int fanStatus = 0;
        float httemp = 0;
        float hthum = 0;
        float voltage = 0;
        
        #define DHTTYPE DHT22 // Type of DHT Sensor
        #define DHTPIN 3 // Temp & Humidity Sensor Inside
        //DHT dhtHT(DHThomeTheater, DHTTYPE);
        
        //declaration
        void dht_wrapper(); // must be declared before the lib initialization
        
        // Lib instantiate
        PietteTech_DHT DHT(DHTPIN, DHTTYPE, dht_wrapper);
        
        #define SERIAL_EN 
        #define SERIAL_BAUD 115200
                            
        char auth[] = "110354f185074c????ae6878777c5f6"; // Lane's Home Theater Heat Pump
        
        // ********** NON-DELAY LOOP FUNCTION ****************
        unsigned long currentTime;
        unsigned long loopTime;
        
        void dht_wrapper() {
            DHT.isrCallback();
        }
        
        
        void setup()
        {
        	Blynk.begin(auth);
        #ifdef SERIAL_EN
        	Serial.begin(SERIAL_BAUD);
        #endif
        
        	pinMode (A3, INPUT);
        	pinMode (fan, OUTPUT);
        	digitalWrite( fan, LOW);
        	delay (200); // to allow the chip to settle
        
        	currentTime = millis();
        	loopTime = currentTime;
        
        temp();	
        
        }
        
        void loop()
        {
        	Blynk.run();
        	
        	currentTime = millis();
        	if(currentTime >= (loopTime + (10000)))
        	{	
        
        	sensorValue = analogRead(projector);
        	voltage = (sensorValue * (3.2 / 1023.0));
        
            	if(voltage >= .90)
            	{
            		digitalWrite(fan, LOW);
            		fanStatus = 1023;
            		Serial.print("Projector ");
            		Serial.print(voltage);
            		Serial.println(" Vdc");
            	}
            	else
            	{
            		digitalWrite(fan, HIGH);
            		Serial.println("No Voltge Detected");
            	}
        
        	Blynk.run();
        	
        
        	temp();
        
        	
        	blynkStuff();
        	}
        loopTime = currentTime;  // Updates loopTime
        }
        
        
        
        void temp()
        {
        int result = DHT.acquireAndWait();
        	// **************** INSIDE TEMPERATURE & HUMIDITY  ***************
        
        	hthum = DHT.getHumidity();
            httemp = DHT.getFahrenheit();
        	
            Serial.print("Humidity (%): ");
            Serial.println(DHT.getHumidity(), 2);
        
            Serial.print("Temperature (oF): ");
            Serial.println(DHT.getFahrenheit(), 2);
        
        return;
        }
        
        void blynkStuff()
        {
        	Blynk.virtualWrite(V1, fanStatus);
        	Blynk.virtualWrite( V2, httemp,2);
        	Blynk.virtualWrite( V3, voltage,3 );
        	Blynk.virtualWrite(V4, hthum,2);
        	Blynk.run();
        
        return;
        }

Since you are having so many problems, start with flashing a basic blink led program, just to regain confidence that everything else up to that point works.

void setup()
{
  pinMode(D7, OUTPUT);
}

void loop()
{
  digitalWrite(D7, !digitalRead(D7));
  delay(500);
}

Just for the time when your devices will work again, replace the 1023.0 in your analog read calculations with 4095.0 on Particles.

I also see this green breathe with my own device (with no sensor attached or de-powered), so nothing wrong with the device and the software and ext. wiring can be dealt with.
How have you wired the DHT sensor?


BTW: Can we change the topic title? I hope we were able to regain your “trust” and you might eventually make your peace with the not-so-bricked pieces :wink:

This title definetly got the attention your issue needed :+1:

1 Like

@ScruffR,

Thanks for the advice, as you know I’m still breaking my teeth on the photons and C++. Anything you can recommend would be greatly appreciated.

The wiring of the DHT22 is the same as seen. (complete w/10k):

I have my other project running on a Mega 2560 (ethernet shield) with three DHT22’s,Ten Relays (Whole House Fans, Three Garage Doors, the Power, GND, Fan on my A/C system) BH1750 Light Sensor, BMP180 Barometric Press & SI7021(because I had it). The three DHT22’s sat in my office for a few weeks, side by side on the same BB and stayed within .6 of each other. Not bad sensors for $3.

Thank you for all your help with my Green problem.

@ScruffR requested the title of the thread be changed now. I think everyone agrees.

Thank you - Lane F.

@zach @jonlogan @will @harrisonhjones @ScruffR @Moors7

2 Likes

@BulldogLowell Thanks for the advice. I tried it. It does the D7 flash thing as you can see with the Breathing blue cyan light (not enough frames in the GIF to show the blue cyan breathing but you see the color).

Thanks for the advice.

LaneF

1 Like

Great! So it’s not your device, so let’s move on

I’ve slightly altered your code and this works for my Photon (running v0.5.0 - 0.4.9 works just the same).
I’m not using a 10k I just plug the sensor directly into the breadboard (D2 Vcc, D3 data, D4 dummy, D5 GND) and power via D2-D5

#include "blynk/blynk.h"
#include "PietteTech_DHT/PietteTech_DHT.h"

const int projector   = A3; // Projector 12Vdc trigger
const int fan         = D7; // 6" in-line Duct fan, sucking air out
int sensorValue;
int fanStatus;
double httemp;
double hthum;
double voltage;

#define DHTTYPE DHT22 // Type of DHT Sensor
#define DHTPIN  D3   // Temp & Humidity Sensor Inside
#define DHT3v3  D2   // Vcc power for DHT22
#define DHTGND  D5   // GND for DHT22

void dht_wrapper(); // must be declared before the lib initialization

PietteTech_DHT DHT(DHTPIN, DHTTYPE, dht_wrapper);

#define SERIAL_EN 
#define SERIAL_BAUD 115200
                    
char auth[] =  "<--- your token --->"; 

unsigned long currentTime;
unsigned long loopTime;

void dht_wrapper() {
  DHT.isrCallback();
}

void setup()
{
  Particle.variable("fan"     , &fanStatus, INT);        // 0.5.0-rc.1 has a regression here, so you need use the old syntax
  Particle.variable("temp"    , &httemp   , DOUBLE);
  Particle.variable("voltage" , &voltage  , DOUBLE);
  Particle.variable("humidity", &hthum    , DOUBLE);

  //pinMode(projector  , INPUT); // <-- not for analogRead() !!!
  pinMode(fan        , OUTPUT);
  pinMode(DHT3v3     , OUTPUT);
  pinMode(DHTGND     , OUTPUT);
  pinMode(DAC        , OUTPUT);  // <-- use this as analog signal for projector

  digitalWrite(DHTGND, LOW);    // using two pins for power supply makes wiring very
  digitalWrite(DHT3v3, HIGH);   // easy on breadboard (just plug four pins into D2,D3,D4,D5 facing outwards) 
  digitalWrite(fan   , LOW);

  Blynk.begin(auth);
#ifdef SERIAL_EN
  Serial.begin(SERIAL_BAUD);
#endif
}

void loop()
{
  currentTime = millis();
  if(currentTime - loopTime >= 2000)
  {	
    fanStatus += 10;
    fanStatus %= 4096;
    analogWrite(DAC, fanStatus);  // I'm using A6/DAC as voltage source for A3

    sensorValue = analogRead(projector);
    voltage = sensorValue * 3.2 / 4095.0;

    digitalWrite(fan, LOW);
    Serial.printlnf("Projector\t: %.3f Vdc", voltage);

    temp();
    blynkStuff();
  
    loopTime = currentTime;  // Updates loopTime
  }
  Blynk.run();
}

void temp()
{
  digitalWrite(D7, HIGH);
  int result = DHT.acquireAndWait();
  // **************** INSIDE TEMPERATURE & HUMIDITY  ***************

  hthum = DHT.getHumidity();
  httemp = DHT.getCelsius();
	
  Serial.printlnf("Humidity\t: %.2f %%", hthum);
  Serial.printlnf("Temperature\t: %.2f °C", httemp);

  digitalWrite(D7, LOW);
  return;
}

void blynkStuff()
{
  Blynk.virtualWrite(V1, fanStatus   );
  Blynk.virtualWrite(V2, httemp   , 2);
  Blynk.virtualWrite(V3, voltage  , 3);
  Blynk.virtualWrite(V4, hthum    , 2);
  return;
}
3 Likes