How do examples work without tinker?

Playing with the Spark (great job, btw) and I’m trying the temperature example from page
http://docs.spark.io/#/examples

When I hookup the sensor, I can read it using Tinker. I can also issue a curl command which returns:
{
“cmd”: “VarReturn”,
“name”: “temperature”,
“allTypes”: {
“string”: " \u0000P\u0000",
“uint32”: 536891392,
“number”: 536891392,
“double”: null,
“raw”: " \u0000P\u0000"
},
“result”: " \u0000P\u0000",
“coreInfo”: {
“last_app”: “foo”,
“last_heard”: “2013-12-21T02:33:12.012Z”,
“connected”: false,
“deviceID”: “48ff71065067555021151287”
}

…now the actual temperature reported is wrong (it should be in the 0-2048 range AFAIK).

The bigger problem is when I flash the example code. Then the curl command times out. The example indicates the curl command should still work. What am I missing? Thanks!

ive replicated your problem. looking into the issue to see if i can figure it out…

ok. now i have it working, but i feel like it was just a “wait 30 seconds” issue. can you confirm if this is working for you now?
also, you can try curl as a single string…

curl “https://api.spark.io/v1/devices/PUTINYOURDEVICEIDHERE/temperature?access_token=PUTINYOURACCESSTOKENHERE

1 Like

It’s working for me as well without any changes (and I didn’t have to wait 30 seconds either). The joy of embedded programming! :wink:

Thanks!