Get value from spark using linux

Hi,

I’m using Spark local cloud with linux and all works fine, my core is connected by wifi and works. so I have a question, I want get a variable value from Spark, and to do it I’m using this command:

spark get coreid tempResult2

but I receive after 30 seconds a timeout, what is the problem? My code is:

double tempResult2;

void setup()
{
Spark.variable("tempResult2", &tempResult2, DOUBLE);
..........
}

void loop(){
    tempResult2=2;
}

May I reasonably assume you’ve actually replaced coreID with the actual coreID?

Could you execute a spark list to see which Cores/functions/variables are available?

1 Like

Yes I replaced codeID to correct number.

in spark list my core is offline, because it is connected by wifi no by usb. Is it a problem?

Crazy, after connect the core using USB in the server and run “spark list”, now is working. thanks

3 Likes