ioAnimation

io animation is hardware acceleration for serial sequence change of io. now 'loop' animation is available. it loop io changes regarding json array.

request: init

path type conditions description
io.animation.name string
  • required
  • 1 ≤ length ≤ 254
Animation name to use pause/resume 
io.animation.repeat integer
  • default undefined
  • 1 ≤ length ≤ 4294967295
The limitation number of transitions of states 
io.animation.status string
  • required
  • enum
    • "loop"
    • "registrate"
 
io.animation.states[].duration integer
  • required
  • 0 ≤ value ≤ 60000
State duration time(ms) 
io.animation.states[].state object,array   io/pwm commands. 
// Json Example
[
    {
        "io": {
            "animation": {
                "name": "animation-1",
                "status": "loop",
                "states": [
                    {
                        "duration": 500,
                        "state": {
                            "io0": true
                        }
                    },
                    {
                        "duration": 500,
                        "state": {
                            "io0": false
                        }
                    }
                ]
            }
        }
    }
]

request: changeState

path type conditions description
io.animation.name string
  • required
  • 1 ≤ length ≤ 254
 
io.animation.status string
  • required
  • enum
    • "pause"
    • "resume"
 
// Json Example
[
    {
        "io": {
            "animation": {
                "name": "animation-1",
                "status": "pause"
            }
        }
    }
]

response: notify

path type conditions description
io.animation.name string
  • required
  • 1 ≤ length ≤ 254
animation name which is finished 
io.animation.status string
  • required
  • const "finish"
status of an registrated animation 
//Response Example
[
    {
        "io": {
            "animation": {
                "name": "animation-1",
                "status": "finish"
            }
        }
    }
]