• So I'm creating some modules for my project, one of them being a class. This class is in the Modules folder, and is being require'd in. Here's the opening code snippet:

    class Potentiometer {
    	constructor(config, PID) {
    		this.config = config;
    		this.PID = PID;
    		this.registeredCallbackTimerId = undefined;
    		this.setValueTimerId = undefined;
    		this.currentValue = 0;
    	}
    ...
    }
    
    exports = Potentiometer;
    

    ...and of course I'm doing this in the main code:

    let Potentiometer = require('potentiometer');
    let pot = new Potentiometer(config, PID);
    

    When I run the code, I get the 'constructor' is not defined error. I'm on fw 1.93 if that matters. I could use a little help.

About

Avatar for Robin @Robin started