vsergeev / lua-periphery

A Lua library for peripheral I/O (GPIO, LED, PWM, SPI, I2C, MMIO, Serial) in Linux.
MIT License
182 stars 38 forks source link

Lacking PWM feature #19

Closed gustavohmsilva closed 4 years ago

gustavohmsilva commented 5 years ago

I've noticed that although the Python version has PWM capabilities, the Lua version don't count with it. Is this due to some limitation in the Language or just wasn't implemented? If so, is this something on a future milestone?

vsergeev commented 4 years ago

No limitations -- the PWM and LED modules in python-periphery were user contributions. They can be added to c-periphery down the line (or sooner with a PR!), and then easily bound to lua-periphery.

I think I'll create issues here linked to c-periphery issues for each of the modules missing from c-periphery/lua-periphery, but present in python-periphery. It would be nice to have consistent support and API across all three.

Janaka-Steph commented 4 years ago

Sorry to reopen this issue, but I am also interested by this feature. Where can I follow the development? Any other recommendation to have PWM in Lua on Raspberry?

vsergeev commented 4 years ago

I'm actually planning on implementing LED and PWM support in both c-periphery and lua-periphery in the coming 1.5 weeks, so there will be a v2.1.0 release of both soon.

I'm not aware of other Lua libraries with PWM support, but you could access the /sys/class/pwm files directly with the built-in io library in the meanwhile.

Janaka-Steph commented 4 years ago

Ok great, thank you for your detailed answer.

vsergeev commented 4 years ago

@Janaka-Steph I just released v2.1.0 of c-periphery and lua-periphery with LED and PWM support.

Janaka-Steph commented 4 years ago

Woohooo thank you!!