CarbonLibrary (community library)


Name Value
Name CarbonLibrary
Version 0.0.6
Installs 374
License MIT
Author Garrett Bartley
Download .tar.gz
All Versions 0.0.6, 0.0.4, 0.0.3

Example Build Testing

Device OS Version:

This table is generated from an automated build. Success only indicates that the code compiled successfully.

Library Read Me

This content is provided by the library maintainer and has not been validated or approved.



A library for posting metrics to a Carbon daemon.

What You Need

  • A Spark Core
  • A Carbon daemon

How to Use

  1. Set up a TCPClient to use with SparkCarbon.
  2. Instantiate the SparkCarbon library. We'll use a variables named tcpClient and carbon for this example.
  3. In setup(), "begin" the library using carbon.begin(). carbon.begin() will work with a few variations.
  4. IP Address without port (defaults to 2003): carbon.begin(tcpClient, { 127, 0, 0, 1 });
  5. IP Address with port: carbon.begin(tcpClient, { 127, 0, 0, 1}, 2003);
  6. DNS name without port (defaults to 2003): carbon.begin(tcpClient, "", 2003);
  7. DNS name with port: carbon.begin(tcpClient, "", 2003);
  8. Finally, elsewhere in your code, you can use carbon.sendData("stats.spark-test", 1, 1302905160) (metric, value, timestamp) to post data to your Carbon daemon.

Browse Library Files