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
+12-10
Original file line number
Diff line number
Diff line change
@@ -153,24 +153,26 @@ void loop() {
153
153
154
154
At first, an animation will be in the default mode. In this mode, the animation is simply not doing anything and waits until the mode has changed.
155
155
156
-
| Mode | Constant | Description |
157
-
|------|----------|-------------|
158
-
| default | MODE_DEFAULT | Not playing / waiting |
159
-
| play | MODE_PLAY | Playing back the animation |
160
-
| pause | MODE_PAUSE | Pausing the animation at the current frame |
161
-
| stop | MODE_STOP | Slowly moving the servos to their neutral position |
162
-
| live | MODE_LIVE | Reading serial commands to move the servos in real-time |
156
+
| Constant | Method | Description |
157
+
|----------|--------|-------------|
158
+
| MODE_DEFAULT || Not playing / waiting |
159
+
| MODE_PLAY | play() | Start or resume playing the animation once |
160
+
| MODE_PAUSE | pause() | Pausing the animation at the current frame |
161
+
| MODE_STOP | stop() | Slowly moving the servos to their neutral position |
162
+
| MODE_LOOP | loop() | Start or resume playing the animation in a loop |
163
+
| MODE_LIVE | live(stream) | Reading serial commands to move the servos in real-time |
163
164
164
-
The modes can be changed or triggered via the following methods:
165
+
The modes can be changed or triggered by calling the above methods on the animation object:
165
166
166
167
```ino
167
168
myBlenderAnimation.play();
168
169
myBlenderAnimation.pause();
169
-
myBlenderAnimation.stop(stepDelay);
170
+
myBlenderAnimation.loop();
171
+
myBlenderAnimation.stop();
170
172
myBlenderAnimation.live(stream);
171
173
```
172
174
173
-
> Note: the default mode is only handled internally.
175
+
> Note: the default mode can not be triggered as it is only handled internally.
174
176
175
177
When calling the `stop` method, it is possible to pass a delay in milliseconds. This delay will be used when the servos are moved to their neutral position during the stop mode. To get to the neutral position, the current position will either be increased or decreased by 1. The delay therefore controls how fast or smooth this movement will take place. The default value for this parameter is `20`.
0 commit comments