tokafish / pigpiox

An Elixir wrapper around pigpiod for the Raspberry PI
Apache License 2.0
35 stars 24 forks source link

Is it possible to send waves with `WAVE_MODE_REPEAT_SYNC`? #2

Open xtagon opened 6 years ago

xtagon commented 6 years ago

Hi,

Thank you for creating this library. I am starting to use it for a Nerves project, but I found out I need to use WAVE_MODE_REPEAT_SYNC instead of WAVE_MODE_REPEAT. Is this possible using pigpiox? I'm willing to contribute of course.

I found this http://abyz.me.uk/rpi/pigpio/pdif2.html#wave_send_using_mode but it seems like there isn't an equivalent command code for the socket interface.

Any idea where I should start? Thanks!

xtagon commented 6 years ago

Ah-hah, found it! Socket command WVTXM exists, which lead me to: https://github.com/tokafish/pigpiox/blob/d6732e32e3e26f2ec26fcd0b3359903e88c90cfe/lib/pigpiox/command.ex#L29

So I should be able to add a wrapper function for that.