Dmitry Vilesov / Mbed 2 deprecated power_switch

Dependencies:   mbed BLE_API nRF51822

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Light.cpp Source File

Light.cpp

00001 #include "Light.h"
00002 #include "mbed.h"
00003  
00004 Light::Light(PinName pin)  : _pin(pin)  {
00005     _LightValue = 0.0;
00006 }
00007  
00008 float Light::getLightValue() {
00009     _LightValue = _pin.read()*1000.0f;
00010     return _LightValue;  
00011 }