Problems flashing core

Hi all,

I was able to flash the core even in our office environment (since the cc3000 update), but while it seems to push out events pretty well for some times using Spark.publish(), I cannot update it any more. I’ve had to reset the core to the default firmware, add the wifi credentials and then it works.

Here’s my code as an example:

void setup() {

void loop() {   
    unsigned long time = millis();
    int rand = time % 8;
    event(rand, false, 150); --> sends a Spark.publish event
    event(rand, true, (int)(time % 4096)); --> sends a Spark.publish event
    //tap event?

Is there an issue? Maybe delay(1000) should not be used?

@hansamann, the delay() should not block the OTA from working since it will call the background task while waiting. Without seeing your publish code or any other code you may have in loop(), it’s hard to give any advice. You may want to remove “time” and make “rand” a global and change the line in loop() to:

rand = millis() % 8;


1 Like

I am experiencing the same in a similar code - sending events (read from sensor) with delay(1000). Had to do a factory reset as well, to be able to flash from webide again.