PWM

pwm

available 0 to 5

request: init

path type conditions description
pwmX.io pinSetting
  • required
 
// Json Example
[
    {
        "pwm0": {
            "io": 0
        }
    }
]

request: freq

path type conditions description
pwmX.freq integer
  • required
  • 1 ≤ value ≤ 80000000
frequency (Hz) 
// Json Example
[
    {
        "pwm0": {
            "freq": 40000000
        }
    }
]

request: pulse

path type conditions description
pwmX.pulse number
  • required
  • 0 ≤ value
pulse width (ms) 
// Json Example
[
    {
        "pwm0": {
            "pulse": 500
        }
    }
]

request: modulate

path type conditions description
pwmX.modulate.type string
  • required
  • const "am"
 
pwmX.modulate.symbol_length number
  • required
  • 0.05 ≤ value ≤ 1000
symbol width (ms) 
pwmX.modulate.data bitArray
  • required
 
// Json Example
[
    {
        "pwm0": {
            "modulate": {
                "type": "am",
                "symbol_length": 500,
                "data": [0, 1, 1, 0, 0, 1, 1, 0]
            }
        }
    }
]

request: deinit

path type conditions description
pwmX null
  • required
 
// Json Example
[
    {
        "pwm0": null
    }
]

type defines

bitArray

type conditions examples description
array
  • items
    • 0 ≤ value ≤ 1
  • [0, 1, 1, 0, 0, 1, 1, 0]
  • [0, 0, 1, 0, 0, 0, 0, 0]
Binary data array represented in 0 1. 

pinSetting

type conditions examples description
integer
  • 0 ≤ value ≤ 40
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6