-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
ADS1X15 Continuous Mode AND differential (0_1) & (2_3) #29
Comments
It is rather late now (here) and I need to do some reading about the details to see if it is possible. can take a few days. |
A quick look did not reveal a solution, could code below be an option for you? uint8_t pair = 01;
void setup()
{
// setup stuff here incl. continuous mode gain etc.
pair = 01;
ADS.requestADC_Differential_0_1();
}
void loop()
{
if (ADS.isReady())
{
if (pair == 01)
{
val_01 = ADS.getValue();
pair = 23;
ADS.requestADC_Differential_2_3();
}
else if (pair == 23)
{
val_23 = ADS.getValue();
pair = 01;
ADS.requestADC_Differential_0_1();
}
}
// do other things here
} code is a not working snippet, just to get the idea |
A second option is to read the 4 channels in continuous mode - see examples - and do the math yourself. |
@NovaJeff |
Hello Rob, that was quick! |
Rob I just tried with ADS.setMode(1) in setup() and now handle_conversion() returns true. |
Thanks for testing and fixing. (I will change the example name and code so it is a working one - ADS_async_differential.ino |
Example adjusted and renamed. |
It works great for my project since it's non-blocking and more than fast enough. I really appreciate your swift replies and solutions. |
Thanx, good to hear it solves the issue. I will investigate if I can get continuous differential working, if so I'll let you know. Until that investigation is done I keep this issue open as a reminder for me. |
insight. So to get a real continuous mode version I need to add the RDY (interrupt) pin. (so far theory / hypothesis :) |
|
"In continuous mode the flag that indicates that the ADC is NOT_BUSY is always false." This explains that then... I'm sure the workaround with RDY / interrupt will be a success. Thx Rob! |
Works! Anyway it will be a PR for release 0.3.2 |
Awesome Rob! Thanks for your time on all these nice libraries. |
0.3.2 released. |
Hi Rob, thanks for your libraries, I've been using many of them for years.
Is there a way to get both differential values (0_1 AND 2_3) on continuous mode?
I've been able to get.Value() on either, depending on the trigger read in setup(), but for the life of me I can't find a way to do it on both channels simultaneously...
Is there something obvious I'm missing?
Thank you Rob.
The text was updated successfully, but these errors were encountered: