MQ135をobniz.wiredすると Cannot read property 'start' of undefined エラー

  • ESP32-DevKitCにObnizOSを入れ


    const Obniz = require("obniz");
    const obniz = new Obniz("xxxx-xxxx");
    obniz.connectWait().then(async() => {
        const mq135 = obniz.wired("MQ135", { vcc: 5, gnd: 18, do: 19, ao: 21 });
    PS C:\Users\xxxxxxxx\Desktop\test> node app                                                                   (node:6700) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'start' of undefined
        at MQ135.wired (C:\Users\xxxxxx\Desktop\test\node_modules\obniz\parts\GasSensor\MQ135\index.js:29:21)
        at Obniz.wired (C:\Users\xxxxxx\Desktop\test\node_modules\obniz\obniz\ObnizParts.js:54:17)
        at obniz.connectWait.then (C:\Users\xxxxxxx\Desktop\test\app.js:6:25)
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:189:7)
    (node:6700) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
    (node:6700) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

  • すみません、自己解決いたしました。