Hi,
I’ve added initial support for a sensors API to mynewt in a branch off
develop called “sensors_branch.” You can find a full diff here, or
pull the source code directly:
https://github.com/apache/incubator-mynewt-core/compare/develop...sensors_branch
I’ll caveat that this API needs work, and further implementation with
real sensors, however, I thought I’d send it to the list for:
- early comments
- if other people are playing with sensors and want to join the cause on
the branch, I think now is a decent time.
I have a couple of adafruit sensors locally, and so I plan on adding
support for the tsl2561 and lis3dh next. Although, if someone wants to
beat me to it - by all means.
The interface is defined in this file:
https://github.com/apache/incubator-mynewt-core/compare/develop...sensors_branch#diff-ec052d973c26072d9ac2e198f16e764a
An example implementation of a sensor driver can be found here:
https://github.com/apache/incubator-mynewt-core/compare/develop...sensors_branch#diff-1c17a623363565318dfefdb8891c0376
And calling the API for basic shell functionality (usage), can be found
here:
https://github.com/apache/incubator-mynewt-core/compare/develop...sensors_branch#diff-d90d3b58f5055894b546a7eff86ba20c
Again, I’ll caveat that this is a WIP, so feedback is welcome (don’t
be shy!), and patches / co-development is even more so! This is a
holiday project for me, so I plan on having something pull worthy in
early January, although no promises.
Cheers,
Sterling