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
When not using the standard servo library, you can use the namespace and therefore skip the namespace prefix:
@@ -41,6 +44,9 @@ Servo(...);
41
44
42
45
// Blender animation object
43
46
Animation(...);
47
+
48
+
// Blender show object
49
+
Show();
44
50
```
45
51
46
52
## Defining Servos
@@ -221,3 +227,41 @@ void setup() {
221
227
```
222
228
223
229
The [SwitchModeButton example](examples/SwitchModeButton) shows how to combine all mode methods to control an animation based on a single button. Make sure to also check out the other [examples](examples) to get started quickly.
230
+
231
+
## Defining a Show
232
+
233
+
A show object allows you to combine multiple animations and control their play back in an easy way. You can also think of a show as a playlist of animations. Since the show object does not expect any arguments, the initialization is very simple:
234
+
235
+
```ino
236
+
Show myBlenderShow;
237
+
```
238
+
239
+
### Registering Animations
240
+
241
+
After defining some animations as shown above, we have to register them to the show object by calling the `addAnimation` method:
242
+
243
+
```ino
244
+
myBlenderShow.addAnimation(myBlenderAnimation);
245
+
```
246
+
247
+
This is usually done inside the `setup` function after the animation and servo objects have been defined globally (outside of any function like `setup` or `loop`).
248
+
249
+
Alternatively, we can also create an array of animations and call the `addAnimations` method instead:
0 commit comments