On Intel XDK IOT edition,
I tried:
var mraa=require("mraa");
var mypwm=mraa.pwm(9,-1,false);
mypwm.enable(true);
mypwm.period_us(2000);
mypwm.write(0.5)//half the value
This works fine. But when I bring in another pwm value:
var mraa=require("mraa");
var mypwm=mraa.pwm(9,-1,false);
var mypwm2=mraa.pwm(10,-1,false);
This causes an error. I tried building it, uploading it, all sorts of things. Is there a way where I can have multiple PWM outputs without bringing up an error?
Kirtan S. wrote:
On Intel XDK IOT edition,
I tried:
var mraa=require("mraa");
var mypwm=mraa.pwm(9,-1,false);
mypwm.enable(true);
mypwm.period_us(2000);
mypwm.write(0.5)//half the value
This works fine. But when I bring in another pwm value:
var mraa=require("mraa");
var mypwm=mraa.pwm(9,-1,false);
var mypwm2=mraa.pwm(10,-1,false);
This causes an error. I tried building it, uploading it, all sorts of things. Is there a way where I can have multiple PWM outputs without bringing up an error?
I checked: Mraa doesn’t support PWM on IO10, Only the default “swizzler” states. Libmraa wouldn't know if you modify those hence has to assume the defaults
链接已复制
could you pls check which version of libmraa you have installed?
Kirtan S. wrote:
On Intel XDK IOT edition,
I tried:
var mraa=require("mraa");
var mypwm=mraa.pwm(9,-1,false);
mypwm.enable(true);
mypwm.period_us(2000);
mypwm.write(0.5)//half the value
This works fine. But when I bring in another pwm value:
var mraa=require("mraa");
var mypwm=mraa.pwm(9,-1,false);
var mypwm2=mraa.pwm(10,-1,false);
This causes an error. I tried building it, uploading it, all sorts of things. Is there a way where I can have multiple PWM outputs without bringing up an error?
I checked: Mraa doesn’t support PWM on IO10, Only the default “swizzler” states. Libmraa wouldn't know if you modify those hence has to assume the defaults
