I am trying to use a joystick with node js, and I ran into an issue.
I installed the function with
npm install joystick
that worked well, but when I ran this code to test it:
// Set a deadzone of +/-3500 (out of +/-32k) and a sensitivty of 350
var joystick = new (require('joystick'))(0, 3500, 350);
joystick.on('button', console.log);
joystick.on('axis', console.log);
It gave me this error:
What am I doing wrong?
Thanks!!