plotly interface based on ardunio sample code

Dependents:   Plotly_HelloWorld

Library for plotting a simple x/y scatter chart on the plot.ly website.

See plotly_HelloWorld for sample usage.

Revision:
8:d4f705ba2ea5
Parent:
7:9409a72ab6c0
--- a/plotly.cpp	Tue Jul 29 13:30:31 2014 +0000
+++ b/plotly.cpp	Tue Jul 29 13:43:31 2014 +0000
@@ -4,13 +4,13 @@
 #define plotlyURL "plot.ly"
 #define dataURL "arduino.plot.ly"
 
-plotly::plotly(const char *username, const char *api_key, const char** stream_tokens, const char *filename, int nTraces)
+plotly::plotly(const char *username, const char *api_key, const char* stream_tokens[], const char *filename, int nTraces)
 {
     log_level = 3;  // 0 = Debugging, 1 = Informational, 2 = Status, 3 = Errors, 4 = Quiet (// Serial Off)
     dry_run = false;
     username_ = username;
     api_key_ = api_key;
-    stream_tokens = stream_tokens;
+    stream_tokens_ = stream_tokens;
     filename_ = filename;
     maxpoints = 30;
     world_readable = true;
@@ -39,14 +39,6 @@
 
 bool plotly::init()
 {
-
-    fprintf(stderr,"%d tokens\n",nTraces_);
-    wait(1);
-    for (int i = 0; i<nTraces_; i++) {
-        fprintf(stderr,"%s\n",*(stream_tokens_+i));
-        wait(1);
-    }
-
     //
     //  Create plot with a REST post to plotly
     //  See the clientresp section of https://plot.ly/rest/ for details