This is a Driver for the Analog Devices AD7989 18 Bit ADC.
Revision 8:b143706d6c43, committed 2019-02-04
- Comitter:
- Ryan Vasquez
- Date:
- Mon Feb 04 11:09:56 2019 -0600
- Parent:
- 7:8717395d66e7
- Commit message:
- fixed the for loop in the averaging function
Changed in this revision
AD7989.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/AD7989.cpp Mon Jan 21 19:11:45 2019 +0000 +++ b/AD7989.cpp Mon Feb 04 11:09:56 2019 -0600 @@ -43,9 +43,9 @@ double AD7989_Driver::sample_avg(int num_avgs) { double temp = 0.0; - for(int = 0; i < num_avgs; i++) + for(int i = 0; i < num_avgs; i++) { temp = temp + sample(); } temp = temp/num_avgs; -} \ No newline at end of file +}