You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running bonescript 0.2.4 on latest debian image on bbb.
I have two PWM outputs; P9_22 and P9_42
After a period I need to shutdown pwm outputs (take them to low). As their is no function exposed to write a zero (0) to 'run' I have used recommendation to write a zero to dutycycle in analogWrite, for simple code example see:
var b = require('bonescript');
var pulseOutput = "P9_42";
b.analogWrite(pulseOutput, 0.5, 2000)
setTimeout(function(){
b.analogWrite(pulseOutput, 0)
}, 10000);
P9_42 output pin goes low as expected, but P9_22 doesn't - it has a 10nS spike every 500uS.
Manually writing zero to echo 0 > /sys/devices/ocp.3/bs_pwm_test_P9_22.16/run does work.
Any ideas/suggestions?
Would it be possible to expose disable/enable function in upcoming release?
Try https://github.com/theoctal/octalbonescript It is fork of bonescript with a lot of improvements. And guess what? It has stopAnalog(pin, callback) function for your need. Test it and let us know.
From @colinbes on June 4, 2014 19:7
I am running bonescript 0.2.4 on latest debian image on bbb.
I have two PWM outputs; P9_22 and P9_42
After a period I need to shutdown pwm outputs (take them to low). As their is no function exposed to write a zero (0) to 'run' I have used recommendation to write a zero to dutycycle in analogWrite, for simple code example see:
P9_42 output pin goes low as expected, but P9_22 doesn't - it has a 10nS spike every 500uS.
Manually writing zero to
echo 0 > /sys/devices/ocp.3/bs_pwm_test_P9_22.16/run
does work.Any ideas/suggestions?
Would it be possible to expose disable/enable function in upcoming release?
Thanks
Colin
Copied from original issue: jadonk#88
The text was updated successfully, but these errors were encountered: