-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
add ads1115 module #1942
add ads1115 module #1942
Conversation
app/modules/ads1115.c
Outdated
|
||
switch (ads1115_samples) { | ||
case (ADS1115_DR_8SPS): | ||
os_delay_us(128000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should use a timer instead of a delay. A current issue (#1892) is suggesting that we remove all instances of os_delay_us from the code base.
Edit: I shouldn't comment when I'm tired.
From the Extension Developer FAQ:
The Espressif guideline is that no individual task should run for more than 15 mSec, before returning control to the SDK.
Considering this information, it might be better to have the ADC read be asynchronous, so the processor can do other things while waiting for the ADC to return the value.
docs/en/modules/ads1115.md
Outdated
* `ads1115.DIFF_1_3` channel 1 to 3 | ||
* `ads1115.DIFF_2_3` channel 2 to 3 | ||
- `MODE` Device operating mode | ||
* `ads1115.SINGLE_SHOT` singel-shot mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo. Should be Single-shot
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @zelll!
* add ads1115 module * replace os_delay with os_timer * typo
dev
branch rather than formaster
.docs/en/*
.Adds a module for the ADS1115 16-Bit analog-to-digital converter.