How to transfer data between 2 cores?

Now that i received my second Core i wrote this code (Core that measures and then sends temp value to cloud):

[code]// This #include statement was automatically added by the Spark IDE.
#include “OneWire/OneWire.h”

// This #include statement was automatically added by the Spark IDE.
#include “spark-dallas-temperature/spark-dallas-temperature.h”
#define EVENTNAME "temperatuur"
DallasTemperature dallas(new OneWire(D6));

double celsius = 1;
unsigned int now = 0;

void setup()
{
Serial.begin(9600);
dallas.begin();
now = millis();
}

void loop()
{
dallas.requestTemperatures();
double celsius = dallas.getTempCByIndex( 0 );

if ((millis() - now) > 2000) {
Spark.publish(EVENTNAME, String(celsius, 1)); // <-- observe STRING
Serial.print("Temp (andurplaadi serial): "); Serial.println(celsius) ;
now = millis();
}
}[/code]

It seems to work OK (uploads data) but there is this thing again that i can’t reflash Core once i upload this code.