Skip to content

Commit 98c0784

Browse files
committed
updated README
1 parent 9a8885a commit 98c0784

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ Plotter p;
5353

5454
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.
5555
```arduino
56-
void setup() {
56+
void setup()
57+
{
5758
p = Plotter();
5859
5960
p.AddTimeGraph( "Some title of a graph", 500, "label for x", x );
@@ -62,10 +63,11 @@ void setup() {
6263

6364
Update variables as you normally would and call plot whenever you are ready. This example simply assigns arbitrary sine data.
6465
```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 ) );
6769
68-
p.plot(); // usually called within loop()
70+
p.Plot(); // usually called within loop()
6971
}
7072
```
7173

@@ -76,4 +78,15 @@ Once the Arduino is running, start the listener application that you setup above
7678

7779
The application will configure itself and your data should be plotted appropriately.
7880

79-
![Quick Start Results Image](https://www.dropbox.com/s/jcj7wilsu8fbzia/quickstart.png?raw=1)
81+
![Quick Start Results Image](https://www.dropbox.com/s/jcj7wilsu8fbzia/quickstart.png?raw=1)
82+
83+
Documentation:
84+
------------
85+
86+
#### void AddTimeGraph( String title, int pointsDisplayed, String label1, Variable1Type variable1 )
87+
88+
*Add a 1-variable graph vs. time*
89+
- title: String with title of graph
90+
- pointsDisplayed: number of points to be shown at a given time. Used to control time-scaling
91+
- label1: String with label of the plotted variable
92+
- variable1: global variable that will be updated throughout program

0 commit comments

Comments
 (0)