The Lumu SDK helps you connect Lumu to your iOS application. It provides the essential methods for managing the connection with Lumu and receiving data.
Lumu is a light meter for iOS devices that helps you take great photos. For more information about Lumu please visit our website.
- Add the
Lumu.framework
to your project - Link the
AVFoundation.framework
,MediaPlayer.framework
,AudioToolbox.framework
andCoreTelephony.framework
to your project - Import
LumuManager.h
in your class - Start measuring!
To start receiving data from Lumu in your class, you have to complete the following steps:
- Conform to the
LumuManagerDelegate
protocol - Register your class as the delegate for Lumu:
[LumuManager sharedManager].delegate = self;
- Implement the optional protocol methods, to receive data from Lumu
LumuManager provides the next optional protocol methods:
/*!
* This method is called when the attached device is recognized as Lumu.
*/
-(void)lumuManagerDidRecognizeLumu;
/*!
* This method is called when the attached device is NOT recognized as Lumu.
*/
-(void)lumuManagerDidNotRecognizeLumu;
/*!
* This method is called every time the manager receives a new value from Lumu.
* @param value the received light value
*/
-(void)lumuManagerDidReceiveData: (double)value;
/*!
* This method is called every time the manager starts communicating with Lumu.
*/
-(void)lumuManagerDidStartLumu;
/*!
* This method is called every time the manager stops communicating with Lumu.
*/
-(void)lumuManagerDidStopLumu;
By default, the LumuManager will try to start Lumu as soon as you set the delegate property. It will also automatically stop and start Lumu when you detach/attach it.
If you would like to manually start and stop Lumu you have to set the shouldRecognizeLumu
property to NO
, before you set the delegate property. Then you have to use startLumuManager
and stopLumuManager
methods.
You can convert the light measurement from Lux to Foot-candles with the convertToFootCandles: (CGFloat)lux
method.
The example project uses the Lumu SDK to receive data from Lumu and to simply display this value on a Label. It stops the LumuManager when the App stops being active, and starts it when the App is in the foreground again.
No. In order to get light measurements and a response from the SDK you need Lumu. You can order one from our website.
If you have any questions, troubles or comments, please send us an email to support@lu.mu and we will help you.