SparkFun Forums 

Where electronics enthusiasts find answers.

By ant.innit
#178826
Anyone got the Edison PWM Block running, i've using C++ but not sure of the best way to set the PWM and write to the output channels.
By bylos
#180196
Hi ant.innit,

I've been using the PWM Block from SparkFun for Intel Edison recently without any issue in C programming.

My code is based on this library :
https://github.com/TeraHz/PCA9685/tree/master/src
which I adapted as a C library in my program, with some minor modifications.
Also I had to make some precise measurments to retrieve the exact value of internal oscillator, which was closer to 27MHz than 25MHz in my case

There won't be much difference between using the library in C or C++ in terms of performance, both are efficient enough

Regards
By ant.innit
#180544
wow, omg I just spotted this- thanks for posting Bylos I'll give it a try this weekend.