![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Demo of the ACS712 Library
Fork of ece4180_lab4_ACS712 by
Diff: ACS712.h
- Revision:
- 5:a022ca4aaa1e
- Parent:
- 4:f6c160553ca3
--- a/ACS712.h Sun Mar 13 17:29:44 2016 +0000 +++ b/ACS712.h Sun Mar 13 17:47:14 2016 +0000 @@ -70,11 +70,11 @@ float ACS712::translate(float val){ switch(type){ case 5: - return (val*ratio - 2.5*ratio)/(.185*ratio); + return (val*ratio - 2.46*ratio)/(.185*ratio); case 20: - return (val*ratio - 2.5*ratio)/(.1*ratio); + return (val*ratio - 2.46*ratio)/(.1*ratio); case 30: - return (val*ratio - 2.5*ratio)/(.066*ratio); + return (val*ratio - 2.46*ratio)/(.066*ratio); default: return 999; }