Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MadLittleMods/fbd0a55b3470bffa06a3759a6aa45c5e to your computer and use it in GitHub Desktop.
Save MadLittleMods/fbd0a55b3470bffa06a3759a6aa45c5e to your computer and use it in GitHub Desktop.

When using a small frequency value with analogWrite(pinString, dutyCycle, frequencyHz, callback), the following error can be thrown.

var b = require('bonescript');
b.pinMode('P9_14', b.OUTPUT);
b.analogWrite('P9_14', 0.5, 10, function(res) { console.log(JSON.stringify(res)); });
info: Unable to update PWM period, period is set to 100000000
        Is other half of PWM enabled?

I haven't figured out how to reset it yet so I just run reboot or reset the device via the on-board button.

@LiguangRuan
Copy link

Have you solved this problem? I also have this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment