Omega2 PWM-Expansion and Node.js

  • Hi, I'm working on an Omega2+ project.
    I took the following lines from the documentation but always get an exception on setupDriver.
    The PWM does something since the servo seems to be powered and the PWM library even outputs a line.
    Anyone experience with it?

    var pwmExp = require("/usr/bin/node-pwm-exp");

    if (pwmExp.checkInit()) {
    console.log('Oscillator sucessfull initialized');
    } else {
    console.error('Error with oscillator initializing');
    pwmExp.setupDriver(-1, 5.0, 0.0);


  • The python version of the code works fine.. guess there is a bug in the node library. Hope that's fixed soon.. hate working with py

  • i saw this today, not sure if it is connected to your issue.
    changelog snip

    February 16, 2017

    Overhauled Node modules for Relay, PWM, and OLED Expansions

Log in to reply

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.