mraa icon indicating copy to clipboard operation
mraa copied to clipboard

[solved] mraa 2.0.0 pwm period invalid argument

Open novski opened this issue 5 years ago • 2 comments

I built my own openwrt and ajusted mraa to work with pwm. I can dimm a LED. But the command logread says local1.err libmraa[2056]: pwm0 write_period: Failed to write to period: Invalid argument I tried all period commands with all kind of types (float and int of all sizes) but it seems not to be happy with what i feed. Can I somehow dig deeper inside mraa? Are there other log's or debugging tools to use?

novski avatar Mar 19 '20 21:03 novski

Hi @novski, the period() functions use mraa_pwm_write_period(mraa_pwm_context dev, int period) internally. This is part of the pwm.c file if you care to explore the sources further. It looks like you may be dealing with a permission error. Building and debugging the project is pretty straightforward from your IDE of choice otherwise. You can generally load the project's sources and step through the code too.

Propanu avatar Mar 24 '20 02:03 Propanu

Thanks @Propanu. I found an unnecessary colon in my python code. Copy left over of an javaskript example. My Bad.

novski avatar Mar 24 '20 19:03 novski