adkron / grovepi

Use the GrovePi in Elixir
Apache License 2.0
47 stars 9 forks source link

Add Sound trigger #13

Closed adkron closed 7 years ago

adkron commented 7 years ago

The default trigger for sound is a hysteresis trigger with thresholds set at 490 and 510. This trigger will only fire when a threshold when the opposite trigger is fired.

Extracted a poller module for polling type interfaces.

The polling modules require a few arguments. These are for setting the default triggering mechanism and the read type. The read type is the type of return value from the read_value callback. The read value callback is required to be implemented. This callback is how we get the data into the poller.

Amos King @adkron amos@binarynoggin.com

adkron commented 7 years ago

I probably need to make a change here that allows options to be passed into the triggers. This becomes more important with the hysteresis trigger. I also want to make a behavior for the triggers.

adkron commented 7 years ago

This will close #12

sourcelevel-bot[bot] commented 7 years ago

Ebert has finished reviewing this Pull Request and has found:

You can see more details about this review at https://ebertapp.io/github/fhunleth/grovepi/pulls/13.

tapickell commented 7 years ago

Looks good.