Skip to content

Instantly share code, notes, and snippets.

@zsup
zsup / gist:12859c28b4ed88b268fa
Created October 29, 2014 07:56
Keybase proof
### Keybase proof
I hereby claim:
* I am zsup on github.
* I am zs (https://keybase.io/zs) on keybase.
* I have a public key whose fingerprint is 392A 4266 55AC 9C51 4A1A 8ABA ADD8 05EB 53FC DDC1
To claim this, I am signing this object:
@zsup
zsup / connectivity.md
Last active August 29, 2015 13:57
Documentation for controlling connectivity on the Spark Core

By default, the Spark Core connects to the Cloud and processes messages automatically. However there are many cases where a user will want to take control over that connection. The following methods are available to control the connectivity of the Spark Core.

System modes

There are three available system modes: AUTOMATIC, MANUAL_CONNECT, and MANUAL. These modes describe how connectivity is handled.

System modes must be called before the setup() function.

System.mode(AUTOMATIC)

@zsup
zsup / publish.cpp
Created March 11, 2014 21:35
Basic Spark.publish() usage
// The most basic event, without data.
Spark.publish("motion-detected");
// Some events require additional data.
Spark.publish("temperature", "19 F");
// You can set a TTL to persist data in the cloud...
Spark.publish("lake-depth/1", "28", 21600);
// ...and make events private for secure applications.