Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we keep polling #37

Open
adkron opened this issue Mar 2, 2018 · 5 comments
Open

Should we keep polling #37

adkron opened this issue Mar 2, 2018 · 5 comments

Comments

@adkron
Copy link
Owner

adkron commented Mar 2, 2018

Polling gives us a friendly interface for sending event and messages, but it also limits some of the more advanced work that someone may want to do with their systems. It also defines the controls that an end user has when using the library.

For 1.0 should we pull the polling out into a new GenServer for end-user use? Should we drop it entirely? Should we keep it the same as it is?

@fhunleth
Copy link
Collaborator

fhunleth commented Mar 2, 2018

Do you have a non-polling use case? The GrovePi isn't capable of sending notifications since its interface is I2C. Or maybe I'm misunderstanding?

@adkron
Copy link
Owner Author

adkron commented Mar 9, 2018

I guess I don't have any specifics other than wanting to have a little more control over what is going on. I guess we could offer a default server, and then a module. So GrovePi.Lighting would be the server, but if they want more control we can also expose GrovePi.Lightning.Sensor?

@axelclark
Copy link
Collaborator

I'm not sure we can delete the Polling module with deleting or re-writing a number of our existing modules (e.g. DHT, Button, Sound, & Potentiometer).

I read through your lightning-sensor branch and saw that implemented your own polling functionality.

Did you run into problems with getting the data you wanted back from polling, setting triggers, sending commands to update the configuration of the sensor, or was it another issue?

@adkron
Copy link
Owner Author

adkron commented Mar 10, 2018 via email

@axelclark
Copy link
Collaborator

Oh, I see now, all of the APIs expect a pin. If you could pass a parameter to the existing Polling module to enable I2C read & write, would that have been enough? I guess you would also need to subscribe to an address or device rather than a pin, so a fairly large update would be required. I wonder if you could extract an I2CPolling module from your lightning-sensor branch?

I noticed you added Protocol & Behaviour . I have to read up on those features, I haven't used them before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants