Rsponse waiting timeout in milliseconds
Static prefixedio animation is used when you wish to accelerate the serial sequence change of io.
"Loop" animation can be used. io changes repeatedly in a sequential manner according to json array. io and pwm json commands can only be used.
obnizOS ver >= 2.0.0 required.
//javascript
// Javascript Example
obniz.io.animation("animation-1", "loop", [
{
duration: 10,
state: function(index){ // index = 0
obniz.io0.output(false)
obniz.io1.output(true)
}
},{
duration: 10,
state: function(index){ // index = 1
obniz.io0.output(true)
obniz.io1.output(false)
}
}
])
It will generate signals likes below

obniz.io.animation("animation-1", "loop")
obniz.io.animation("animation-1", "pause")
obniz.io.animation("animation-1", "resume")
name of animation
status of animation
Optional animations: DirectiveAnimationFrame[]instructions. This is optional when status is pause``resume.
Optional repeat: numberThe number of repeat count of animation. If not specified, it repeat endless.
It start io aniomation with limited repeat count. And It wait until done.
// Javascript Example
await obniz.io.repeatWait([
{
duration: 1000,
state: function(index){
obniz.io0.output(true)
}
},{
duration: 1000,
state: function(index){
obniz.io0.output(false)
}
}
], 4)
instructions
The number of repeat count of animation.
Generated using TypeDoc
obniz to be used