{"action":"created","issue":{"url":"https://api.github.com/repos/micropython/micropython/issues/2093","repository_url":"https://api.github.com/repos/micropython/micropython","labels_url":"https://api.github.com/repos/micropython/micropython/issues/2093/labels{/name}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/2093/comments","events_url":"https://api.github.com/repos/micropython/micropython/issues/2093/events","html_url":"https://github.com/micropython/micropython/issues/2093","id":156092037,"number":2093,"title":"RFC: Sensor driver interface","user":{"login":"pfalcon","id":500451,"avatar_url":"https://avatars.githubusercontent.com/u/500451?v=3","gravatar_id":"","url":"https://api.github.com/users/pfalcon","html_url":"https://github.com/pfalcon","followers_url":"https://api.github.com/users/pfalcon/followers","following_url":"https://api.github.com/users/pfalcon/following{/other_user}","gists_url":"https://api.github.com/users/pfalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/pfalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfalcon/subscriptions","organizations_url":"https://api.github.com/users/pfalcon/orgs","repos_url":"https://api.github.com/users/pfalcon/repos","events_url":"https://api.github.com/users/pfalcon/events{/privacy}","received_events_url":"https://api.github.com/users/pfalcon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/micropython/micropython/labels/rfc","name":"rfc","color":"FF66CC"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-05-21T09:00:25Z","updated_at":"2016-05-28T10:22:36Z","closed_at":null,"body":"As one of the latest KS stretch goals, we need to implement suite of drivers for number of sensors, and it would be nice to come up with a general sensor driver model to follow.\r\n\r\nRequirements:\r\n\r\n1. A general, baseline interface (userstory: \"I have a hundred of sensor, how do I use them in similar manner of *any MicroPython port*\", not: \"My project is centered around capabilities of a particular sensor, how do I expose them?\")\r\n2. The general requirement is avoiding memory allocations to perform sensor reading\r\n3. One of the biggest contention points is usage of floating-point vs fixed points numbers, and if the latter, then how. Given that floating-point support is optional, and may lead to memory allocation, would be strongly nice to support (allocation-free) fixed point.\r\n4. Should be general enough for any sensor (including sensors which measure several values).\r\n5. There should be balance between efficiency tricks and pythonic ease of use."},"comment":{"url":"https://api.github.com/repos/micropython/micropython/issues/comments/222301378","html_url":"https://github.com/micropython/micropython/issues/2093#issuecomment-222301378","issue_url":"https://api.github.com/repos/micropython/micropython/issues/2093","id":222301378,"user":{"login":"pfalcon","id":500451,"avatar_url":"https://avatars.githubusercontent.com/u/500451?v=3","gravatar_id":"","url":"https://api.github.com/users/pfalcon","html_url":"https://github.com/pfalcon","followers_url":"https://api.github.com/users/pfalcon/followers","following_url":"https://api.github.com/users/pfalcon/following{/other_user}","gists_url":"https://api.github.com/users/pfalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/pfalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfalcon/subscriptions","organizations_url":"https://api.github.com/users/pfalcon/orgs","repos_url":"https://api.github.com/users/pfalcon/repos","events_url":"https://api.github.com/users/pfalcon/events{/privacy}","received_events_url":"https://api.github.com/users/pfalcon/received_events","type":"User","site_admin":false},"created_at":"2016-05-28T10:22:36Z","updated_at":"2016-05-28T10:22:36Z","body":"@kfricke : I believe previous messages clarify intent of this ticket, it's scope and how extension to it can be handled. As it is now, it doesn't represent any established API, and in my list, wait for response from @dpgeorge (though alternative - consistent and more or less elaborated - proposals are welcome from other interested parties). If you like the current proposal, you're welcome to explore it by trying to implement drivers along it lines, but it would be just a research work, again, it's not suitable for anything \"production\". (For example, if @dpgeorge or someone else comes with a better proposal which covers all the current requirements, and more). Note that if @dpgeorge doesn't respond, then he's busy with other things and it make take him quite awhile to get to this topic. And that's why I created this topic - to record my thoughts, which a based on months of previous discussions in tickets and on forum - to not forget these thoughts, as I'm working on (a lot of) other things in the meantime.\r\n"}}
{"actor":{"display_login":"pfalcon"}}