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

adc: Add adc support based on sysfs #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rzr
Copy link
Collaborator

@rzr rzr commented Sep 28, 2018

Inpired by IoT.js API

Change-Id: Ie9e006c667cbc39747c49251e41a7b25aa9d4607
Signed-off-by: Philippe Coval p.coval@samsung.com

Inpired by IoT.js API, tested on ARTIK710:

```
NODE_PATH=lib node example/adc-example.js
1745
```

Change-Id: Ie9e006c667cbc39747c49251e41a7b25aa9d4607
Signed-off-by: Philippe Coval <p.coval@samsung.com>
@rzr rzr force-pushed the sandbox/rzr/devel/adc/master branch from 903482c to cdff624 Compare September 28, 2018 07:59
@rzr
Copy link
Collaborator Author

rzr commented Sep 30, 2018

Is this desired @EnotionZ or out of scope ?

@EnotionZ
Copy link
Owner

I think we should hold off merging this until we figure out a consistent way to define support for various boards as well as features outside of the standard read/write (such as adc, pwm, etc).

When someone does a var gpio = require('gpio') (pulling package from npm) and specify the board they're using, the supported features should be available for use through that exported gpio object. Right now this adc module is unreachable, and specifying the path is a manual process.

rzr added a commit to TizenTeam/webthing-node that referenced this pull request Oct 1, 2018
To abstract different ADC or sysfs API,

Note: later this class could land later in separate project
(ie: gpio, iotjs-node? sysfs-node?)
but since it's trivial let's share it here.

Relate-to: EnotionZ/gpio#53
Change-Id: I923159901d3af3e1990ccf3e1510d561c2e0783b
Signed-off-by: Philippe Coval <p.coval@samsung.com>
rzr added a commit to TizenTeam/webthing-node that referenced this pull request Oct 1, 2018
To abstract different ADC or sysfs API,

Note: later this class could land later in separate project
(ie: gpio, iotjs-node? sysfs-node?)
but since it's trivial let's share it here.

Relate-to: EnotionZ/gpio#53
Change-Id: I923159901d3af3e1990ccf3e1510d561c2e0783b
Signed-off-by: Philippe Coval <p.coval@samsung.com>
mrstegeman pushed a commit to WebThingsIO/webthing-node that referenced this pull request Oct 1, 2018
* adc: Add Adc class

To abstract different ADC or sysfs API,

Note: later this class could land later in separate project
(ie: gpio, iotjs-node? sysfs-node?)
but since it's trivial let's share it here.

Relate-to: EnotionZ/gpio#53
Change-Id: I923159901d3af3e1990ccf3e1510d561c2e0783b
Signed-off-by: Philippe Coval <p.coval@samsung.com>

* adc: Add AdcInProperty sensor class

To support analog inputs

Aligned to Gpio class

Change-Id: Ic2b25cd172e9591fca4ce1e2920af92d2a218e0d
Signed-off-by: Philippe Coval <p.coval@samsung.com>

* artik: Support ADC properties

Change-Id: I3e858f3a66e92546a3bba920a75d3fa299ae7c00
Signed-off-by: Philippe Coval <p.coval@samsung.com>
@rzr
Copy link
Collaborator Author

rzr commented Oct 1, 2018

What do you think about preparing a new 'sysfs' module and try to keep 'gpio' one minimal ?

@rzr
Copy link
Collaborator Author

rzr commented Jul 14, 2020

is this project active?

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

Successfully merging this pull request may close these issues.

2 participants