You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-5Lines changed: 18 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,8 @@ Plotter p;
53
53
54
54
Create the Plotter object and add graphs as desired. When adding graphs, the first argument is a String with the title of the graph and the second argument is an int with the number of points displayed at any given time. These two arguments are followed by a String and your corresponding variable.
55
55
```arduino
56
-
void setup() {
56
+
void setup()
57
+
{
57
58
p = Plotter();
58
59
59
60
p.AddTimeGraph( "Some title of a graph", 500, "label for x", x );
@@ -62,10 +63,11 @@ void setup() {
62
63
63
64
Update variables as you normally would and call plot whenever you are ready. This example simply assigns arbitrary sine data.
64
65
```arduino
65
-
void loop() {
66
-
x = 10*sin(2.0*PI*(millis()/5000.0));
66
+
void loop()
67
+
{
68
+
x = 10*sin( 2.0*PI*( millis() / 5000.0 ) );
67
69
68
-
p.plot(); // usually called within loop()
70
+
p.Plot(); // usually called within loop()
69
71
}
70
72
```
71
73
@@ -76,4 +78,15 @@ Once the Arduino is running, start the listener application that you setup above
76
78
77
79
The application will configure itself and your data should be plotted appropriately.
0 commit comments