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?

-- 
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/f30ed627-81cf-43af-913c-057e8446ece5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to