Here I am trying to turn on a buzzer for one second and then turn it off. Here is the code
`
#!/usr/bin/env node
var b = require(‘bonescript’);
b.pinMode(‘P8_19’, b.ANALOG_OUTPUT);
b.analogWrite(‘P8_19’, 0.5, 2000.0, printStatus);
function printStatus(x) {
console.log('x.value = ’ + x.value);
console.log('x.err = ’ + x.err);
}
setTimeout(function() {
b.analogWrite(‘P8_19’, b.low); // Turn off buzzer after milliseconds time
}, 1000);
`
This code gives the following error after i try to run it immediately after reboot
error: Error enabling PWM controls: Error: ENOENT, no such file or directory '/sys/devices/ocp.3/bs_pwm_
test_P8_19.15/polarity’
how to solve the problem?