PWM output with BoneScript and C++ timer fault

Hello there,

i’m running a C++ program in eLinux on my beaglebone black

it sends outs PWM signals using analogWrite, in C++ code:

std::string cmdUresC=(“node -e “require(‘bonescript’).analogWrite(‘P8_13’,”+NumberToString(u1)+”, 50, console.log);"");


I selected the pins based on the table found here:

now the problem is when I implement a timer like specified here:

it gives me wrong output: the program takes much more time to complete than the output suggests. I’m positivly sure this is due to the ‘bonescript’ command

has anyone else have this specific problem or maybe a suggestion?

Your time is much appreciated.