Breathing green after flashing

Strangest thing is happening:

I factory reset - connect to wifi - it breathes Cyan.
The second I flash new code, it comes back breathing Green.

Then did another factory reset and ran:
particle flash --factory tinker
particle flash --usb cc3000
particle flash --usb tinker

Connected to wifi - its breathes Cyan… happy days… until i flash new code,

IT COMES BACK BREATHING GREEN!

HELP! ???

@arnonel,

can you try flashing an empty app?

Also, how are you flashing code? Web IDE?

Web IDE

Ok nice. Can you give it a try again? I will also hook up my core later and give it a shot.

cleared it again
Flashed empty app - works ok
Flashed my code again - starts flashing green

Could something in the code be causing this?

Can you paste the code here with the format:

``` <-- insert this
paste code here
``` <-- insert this
// This #include statement was automatically added by the Spark IDE.
#include "blynk/blynk.h"
#define BLYNK_PRINT Serial
//#include "blynk/BlynkSimpleSparkCore.h"

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "notgoingtoshare";

// This #include statement was automatically added by the Spark IDE.
#include "idDHT22/idDHT22.h"
// declaration for DHT11 handler
int idDHT22pin = D4; //Digital pin for comunications
void dht22_wrapper(); // must be declared before the lib initialization

// DHT instantiate
idDHT22 DHT22(idDHT22pin, dht22_wrapper);



const int AOUTpin=0;//the AOUT pin of the CO sensor goes into analog pin A0 of the arduino
const int DOUTpin=8;//the DOUT pin of the CO sensor goes into digital pin D8 of the arduino
const int ledPin=13;//the anode of the LED connects to digital pin D13 of the arduino

int limit;
int value;

// This #include statement was automatically added by the Spark IDE.
//#include "idDHT22/idDHT22.h"


// This wrapper is in charge of calling
// mus be defined like this for the lib work
void dht22_wrapper() {
	DHT22.isrCallback();
}

void setup() {
Serial.begin(115200);//sets the baud rate
Blynk.begin(auth);
pinMode(DOUTpin, INPUT);//sets the pin as an input to the arduino
pinMode(ledPin, OUTPUT);//sets the pin as an output of the arduino

}

void loop()
{
    Blynk.run();
    value= analogRead(AOUTpin);//reads the analaog value from the CO sensor's AOUT pin
    limit= digitalRead(DOUTpin);//reads the digital value from the CO sensor's DOUT pin
    Serial.print("CO value: ");
    Serial.println(value);//prints the CO value
    Serial.print("Limit: ");
    Serial.print(limit);//prints the limit reached as either LOW or HIGH (above or underneath)
    delay(100);
    if (limit == HIGH){
        digitalWrite(ledPin, HIGH);//if limit has been reached, LED turns on as status indicator
        }
    else{
        digitalWrite(ledPin, LOW);//if threshold not reached, LED remains off
    }
    
    Blynk.virtualWrite(0, "\nRetrieving information from sensor: ");
	Blynk.virtualWrite(0, "Read sensor: ");
    DHT22.acquire();
    while (DHT22.acquiring())
		;
	int result = DHT22.getStatus();
	switch (result)
	{
		case IDDHTLIB_OK:
			 Blynk.virtualWrite(0, "OK");
			break;
		case IDDHTLIB_ERROR_CHECKSUM:
			Blynk.virtualWrite(0, "Error\n\r\tChecksum error");
			break;
		case IDDHTLIB_ERROR_ISR_TIMEOUT:
			Blynk.virtualWrite(0, "Error\n\r\tISR Time out error");
			break;
		case IDDHTLIB_ERROR_RESPONSE_TIMEOUT:
			Blynk.virtualWrite(0, "Error\n\r\tResponse time out error");
			break;
		case IDDHTLIB_ERROR_DATA_TIMEOUT:
			Blynk.virtualWrite(0, "Error\n\r\tData time out error");
			break;
		case IDDHTLIB_ERROR_ACQUIRING:
			Blynk.virtualWrite(0, "Error\n\r\tAcquiring");
			break;
		case IDDHTLIB_ERROR_DELTA:
			Blynk.virtualWrite(0, "Error\n\r\tDelta time to small");
			break;
		case IDDHTLIB_ERROR_NOTSTARTED:
			Blynk.virtualWrite(0, "Error\n\r\tNot started");
			break;
		default:
			Blynk.virtualWrite(0, "Unknown error");
			break;
	}
	//Serial.print("Humidity (%): ");
	//Serial.println(DHT22.getHumidity(), 2);
    
    Blynk.virtualWrite(5,DHT22.getCelsius());
    Blynk.virtualWrite(6,DHT22.getCelsius());
    
	//Serial.print("Temperature (oC): ");
	//Serial.println(DHT22.getCelsius(), 2);

	//Serial.print("Temperature (oF): ");
	//Serial.println(DHT22.getFahrenheit(), 2);

	//Serial.print("Temperature (K): ");
	//Serial.println(DHT22.getKelvin(), 2);

	//Serial.print("Dew Point (oC): ");
	//Serial.println(DHT22.getDewPoint());

	//Serial.print("Dew Point Slow (oC): ");
	//Serial.println(DHT22.getDewPointSlow());

	delay(2000);
	
    
    
}

Weird that this causing flashing green, then I cant do anything again until i factory reset and start again. Even if i reset it flashes green and means I cannot reflash from web ide

It doesn’t look like a code issue though.

@peekay123 does the Blynk thing take over the RGB led?

Its not just the LED though - I cannot flash a second time

In command line - shows me as online
In Web IDE - shows core online

Cannot flash via web ide though -

Blynk shows core as offline

Does Blynk have a Web IDE as well? cos i’m not familiar with that platform.

I would recommend trying out some non-Blynk code and if it works well then their app has some issue.

The delay(2000); might also cause some timeout issues.

@arnonel, I have the latest Blynk version from the web IDE running on a Core with no extra code. I can OTA without any problems. HOWEVER, if you added your own code, it may be causing issues ESPECIALLY if you are using the (now deprecated) idDHT22 library. Please use the PIETTECH_DHT web IDE library before trying anything else cause that is the most likely problem. :smiley:

1 Like