Thanks Robert,

BBB seems blocked when I tried to disable pwm one more time:

debian@beaglebone:/sys/class/pwm/pwmchip1/pwm-1:1$ echo 0 > enable 
^C
^C

Hot reboot ?

Sincerely,

Pavel

On Wednesday, September 16, 2020 at 3:45:07 PM UTC+2, RobertCNelson wrote:
>
> On Wed, Sep 16, 2020 at 8:33 AM Pavel Yermolenko <[email protected] 
> <javascript:>> wrote: 
> > 
> >  Hello, 
> > 
> > I modified bone script pwm.js from Derek Molloy book, adapting pin for 
> BBB (in bold): 
> > 
> > var b = require('bonescript'); 
> > var pin = "P9_21";   // Use P1.08 or P1.36 by default on PocketBeagle 
> > var dutyCycle = 0.75; 
> > var frequency = 10000; 
> > 
> > b.pinMode(pin, b.OUTPUT); 
> > b.getPinMode(pin, printPinMux); 
> > b.analogWrite(pin, dutyCycle, frequency, display); 
> > 
> > function printPinMux(val){ 
> >    console.log('mux = '+val.mux); 
> >    console.log('name = '+val.name); 
> > } 
> > 
> > function display(val){ 
> >    console.log(val); 
> > } 
> > 
> > Doesn't work: 
> > 
> > debian@beaglebone:~/exploringbb/chp06/bone$ sudo nodejs pwm.js 
> > error: error updating PWM freq and value: 
> /sys/devices/platform/ocp/48300000.epwmss/48300200.pwm/pwm/pwmchip1/pwm-1:1, 
> Error: EINVAL: invalid argument, write 
> > { err: 
> >    'error updating PWM freq and value: 
> /sys/devices/platform/ocp/48300000.epwmss/48300200.pwm/pwm/pwmchip1/pwm-1:1, 
> Error: EINVAL: invalid argument, write' } 
> > warning: single argument callbacks will be deprecated.please use 
> node-style error-first callbacks: callback(err,response) 
> > mux = undefined 
> > name = UART2_TXD 
> > 
> > Any suggestions ? 
>
> bonescript is being scrapped, use adafruit-beaglebone-io-python... 
>
>
> https://github.com/adafruit/adafruit-beaglebone-io-python 
>
> Regards, 
>
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/5ac23de7-8f70-4201-9c77-52dbf250bfcdo%40googlegroups.com.

Reply via email to