Skip to content

saul_adc: Add scaling option #9810

Closed
jnohlgard wants to merge 3 commits intoRIOT-OS:masterfrom
jnohlgard:pr/saul-analog-sensor
Closed

saul_adc: Add scaling option #9810
jnohlgard wants to merge 3 commits intoRIOT-OS:masterfrom
jnohlgard:pr/saul-analog-sensor

Conversation

@jnohlgard
Copy link
Member

Contribution description

Allows the saul_adc driver to produce physical measurements instead of raw ADC counts.
Only enabled when the analog_util module is used. Requires some additional configuration in adc_params.h.
The configuration is static for now, so certain use cases will need to hard code the analog reference voltage into the scaling parameters in adc_params.h (see Kinetis temperature sensor configuration for frdm-k64f).

Potential follow up PRs:

  • add option to convert to real voltage before scaling.
  • add option for non-linear scaling functions.

Issues/PRs references

Configuration for this approach is much less complicated than what #8581 proposes.

Joakim Nohlgård added 3 commits August 21, 2018 13:29
Allows the saul_adc driver to produce physical measurements instead of
raw ADC counts.
Only enabled when the analog_util module is used. Requires some
additional configuration in adc_params.h.
@jnohlgard jnohlgard added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: boards Area: Board ports Area: SAUL Area: Sensor/Actuator Uber Layer labels Aug 21, 2018
@jnohlgard jnohlgard added this to the Release 2018.10 milestone Aug 21, 2018
@jnohlgard jnohlgard requested review from bergzand and cladmi August 21, 2018 11:49
@kb2ma kb2ma removed this from the Release 2019.10 milestone Oct 8, 2019
@stale
Copy link

stale bot commented Apr 10, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label Apr 10, 2020
@stale stale bot closed this May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: boards Area: Board ports Area: drivers Area: Device drivers Area: SAUL Area: Sensor/Actuator Uber Layer CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR State: stale State: The issue / PR has no activity for >185 days Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants