Hey all,
Is it possible that there are also problems with the strings at the moment ? I just received my core and i tried a few simple things like accessing the variables … and by using the following code i just tested a few things :
double temperature = 0.0;
int intTemperature =0;
char mystr[6];
int counter = 0;
void setup()
{
Spark.variable("temperatures", &intTemperature, INT);
Spark.variable("temperatureString", &mystr, STRING);
}
void loop()
{
intTemperature = counter++;
temperature = counter + (counter / 100);
sprintf(mystr, "%.2f", temperature);
}
And it gave me the following result on the temperatures :
{
"cmd": "VarReturn",
"name": "temperatures",
"TEMPORARY_allTypes": {
"string": "\u0000\u0000\u00022",
"uint32": 562,
"number": 562,
"double": null,
"float": 7.875297369505472e-43,
"raw": "\u0000\u0000\u00022"
},
"result": 562,
"coreInfo": {
"last_app": "",
"last_heard": "2014-01-04T08:09:34.681Z",
"connected": true,
"deviceID": "48ff6c065067555028521587"
}
}
And on the temperateString :
{
"cmd": "VarReturn",
"name": "temperatureString",
"TEMPORARY_allTypes": {
"string": " \u0000P\u0000",
"uint32": 536891392,
"number": 536891392,
"double": null,
"float": 1.0868491504456741e-19,
"raw": " \u0000P\u0000"
},
"result": " \u0000P\u0000",
"coreInfo": {
"last_app": "",
"last_heard": "2014-01-04T08:09:51.312Z",
"connected": true,
"deviceID": "48ff6c065067555028521587"
}
}
Am I missing something ? Or … is there a little bug somewhere ?
Thanks!!