Node-RED PCA9685无法正常工作

时间:2018-02-28 12:32:23

标签: node.js servo

我在Raspberry Pie 3上使用节点红色。我有一块PCA9685板。我按照here所述进行了操作。

  1. 我整合了pca9685。
  2. 我用5伏电源从外部适配器输入能量。
  3. 我建立了the template
  4. 之类的连接
  5. 我写的项目如下:

    [{"id":"feaadd05.f046d","type":"inject","z":"1fe6197f.0d25c7","name":"100%","topic":"","payload":"100","payloadType":"num","repeat":"","crontab":"","once":false,"x":1045,"y":40,"wires":[["46bd9273.6b279c"]]},
     {"id":"71dd9036.680b3","type":"inject","z":"1fe6197f.0d25c7","name":"50%","topic":"","payload":"50","payloadType":"num","repeat":"","crontab":"","once":false,"x":1045,"y":80,"wires":[["46bd9273.6b279c"]]},
     {"id":"89f319a8.9eea78","type":"inject","z":"1fe6197f.0d25c7","name":"Off","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"x":1045,"y":120,"wires":[["46bd9273.6b279c"]]},
     {"id":"1c347df.4004b82","type":"inject","z":"1fe6197f.0d25c7","name":"120�","topic":"","payload":"2100","payloadType":"num","repeat":"","crontab":"","once":false,"x":1045,"y":180,"wires":[["d11db9bf.d2cc58"]]},
     {"id":"ec6ef0f2.d5b56","type":"inject","z":"1fe6197f.0d25c7","name":"60�","topic":"","payload":"1500","payloadType":"num","repeat":"","crontab":"","once":false,"x":1045,"y":220,"wires":[["d11db9bf.d2cc58"]]},
     {"id":"4b72d6f3.2020e8","type":"inject","z":"1fe6197f.0d25c7","name":"0�","topic":"","payload":"900","payloadType":"num","repeat":"","crontab":"","once":false,"x":1045,"y":260,"wires":[["d11db9bf.d2cc58"]]},
     {"id":"eaa2a00e.3dfca","type":"inject","z":"1fe6197f.0d25c7","name":"Off","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"x":1045,"y":300,"wires":[["d11db9bf.d2cc58"]]},
     {"id":"46bd9273.6b279c","type":"PCA9685 out","z":"1fe6197f.0d25c7","name":"PWM Output 2 (Led)","pca9685":"6ce45bce.cdff94","channel":"2","payload":"","unit":"percent","onStep":"0","x":1260,"y":80,"wires":[]},
     {"id":"d11db9bf.d2cc58","type":"PCA9685 out","z":"1fe6197f.0d25c7","name":"PWM Output 4 (Servo)","pca9685":"6ce45bce.cdff94","channel":"4","payload":"","unit":"microseconds","onStep":"0","x":1270,"y":240,"wires":[]},
     {"id":"6ce45bce.cdff94","type":"PCA9685","z":"","deviceNumber":"1","address":"64","frequency":"50"}]
    
  6. 但是我收到了错误。

    Error message: 28.02.2018 15:16:29node: 780c40d.34cd2c
    msg : string[55]
    "Error stopping node: ReferenceError: pwm is not defined"
    

0 个答案:

没有答案