Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 869 Bytes

README.md

File metadata and controls

36 lines (28 loc) · 869 Bytes

SharpSpark

A .NET client for the SparkCore Cloud API

Usage

SparkClient client = new SparkClient("[access token]", "[device id]");

Device Info

SparkDevice deviceInfo = client.GetDevice();

Variables and Functions

SparkVariableResult temperatureResult = client.GetVariable("temperature");
SparkFunctionResult brewResult = client.ExecuteFunction("brew","202","230");

Convenience Methods

decimal temperature = client.GetVariableReturnValue<decimal>("temperature");
int returnValue = client.ExecuteFunctionReturnValue("brew","202","230");

Compiling & Getting Tests to Run

  1. Copy app.config.sample in the Tests project to app.config.
  2. Update the access token and device id appsettings
  3. Flash TestFirmware.cpp from the tests project to your device.
  4. Build, run tests