This is a Testing library
Revision 0:eae38e61d806, committed 2016-11-28
- Comitter:
- javiersing
- Date:
- Mon Nov 28 13:00:21 2016 +0000
- Commit message:
- This is a Testing library
Changed in this revision
LightSensor.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r eae38e61d806 LightSensor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LightSensor.h Mon Nov 28 13:00:21 2016 +0000 @@ -0,0 +1,6 @@ +float readLightSensor(AnalogIn sig, AnalogIn ref) +{ + float opVoltage = 3.3/ref.read(); + float lightSen = opVoltage *sig.read(); + return lightSen; +} \ No newline at end of file