Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 9:d8d2778bfbfd, committed 2017-02-14
- Comitter:
- abraham1
- Date:
- Tue Feb 14 20:37:53 2017 +0000
- Parent:
- 8:6ae3c3cd7f55
- Child:
- 10:ae139f40acc0
- Commit message:
- current sensor offset reset every reset now!;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Feb 14 20:36:07 2017 +0000 +++ b/main.cpp Tue Feb 14 20:37:53 2017 +0000 @@ -99,6 +99,9 @@ while(1) { + currentSensorOffset = 0; i = 0; + for(i=1;i<201;i++){ currentSensorOffset += currentSense.read(); } //TODO: watch out this could take some time, but this should make things better! + currentSensorOffset = currentSensorOffset*VREF/300; while(1) { @@ -128,10 +131,6 @@ while(1) { - // currentSensorOffset = 0; i = 0; TODO: this is not working -// for(i=1;i<201;i++){ currentSensorOffset += currentSense.read(); } //TODO: watch out this could take some time, but this should make things better! -// currentSensorOffset = currentSensorOffset*VREF/300; - green = false; wait(updatePeriod); start = end;