One of the things I’m learning as I’m settling into my #2520orBust challenge, is picking which challenges I’m going to tackle on DVLUP.com. You have to consider the requirements of the challenge and the due dates. You also have to consider the amount of free time you have to devote to the challenge. For me, that’s not much time. So, I’m looking at the low hanging fruit right now. The next challenge on my list is the “New App Special“. It’s 250 pts, and I’ve got until the end of August. The app I have in mind is a lux meter. Although there are others in the store already, I’ve got some ideas on making one a little better. In any case, with the time I’ve got I think it’s doable.
I can start off with the code I wrote for my blog post Sharing Sensor Code in Universal Apps (you can download the code from the link).
Of course, I will only need the LightSensor code for my Lux meter.
Initialization is simple:
private LightSensor _lightsensor; _lightsensor = LightSensor.GetDefault(); if (_lightsensor != null) { _lightsensor.ReadingChanged += _lightsensor_ReadingChanged; }
You have to use the dispatcher RunAsync call to update the UI bound properties.
async void _lightsensor_ReadingChanged(LightSensor sender, LightSensorReadingChangedEventArgs args) { await dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { this.LightSensorReading = args.Reading; }); }
As an engineer, I’m curious about the repeatability of the lux meter between different devices. I’m also curious about the accuracy of the lux meter with a dedicated lux meter. Another question I’d like to answer is the sensitivity to the angle of the device to the reading you get. First step is to complete the app and collect my #2520orBust points. Second step is to answer these questions.
The post Picking your Challenges – Luminance for Points appeared first on Falafel Software Blog.