Main Site Documentation

Suggestions for LED Module


As I got my spider today, I played around a bit with the LED module.
First impression: very nice :slight_smile:

Second impression: Where the heck can I set the color? Oo
Is there really no way to just turn the LED on with a predefined color (like the ones used in Blink() and Fade() )?
There defenitely has to be a way to say

led.SetColor(Color color)

Maybe I am just too stupid to find it… :frowning:

Well we could use FadeOnce with OldColor = Black and new color the desired one, but that is a bit complicated isn’t it?
SetColor() would be a nice and easy addition.

As well as the second needed method:

led.FadeTo(Color color)

Currently you have to get the CurrentColor etc, way to complicated imho :slight_smile:

Well then second suggestion, is about the LED control code.
I made a thread which does nothing but fade from one color to another. Everytime the current fade is finished ( Led.AnimationFinished) it fades to the next color.
Works quite well so far but most of the time the LED flickers a bit while starting the new fade. Doesn’t look too nice but isn’t a deal breaker either.


All this is very very new still and there will be a lot more code to be contributed by GHI and by the community.

If you want to contribute the SetColor method, that would be great. The code is on codeplex if you want to start digging into it.


Well why not :slight_smile:

So this project is really intended to use code from individuals?
I am new to all the .net [italic]MF[/italic] things, so maybe this is pretty common here? :slight_smile:


.NET Gadgeteer is an open-source project.


Well the Method is called

led.TurnColor(Color color)

Quite easy to oversee it :slight_smile:

So now only FadeTo() left to do :slight_smile:


Okay, so now how to get started with contributing source code to the project?
I guess not everyone can just commit his changes?


Correct, you can’t commit but you can get the code.

Once you have something you like to share, post it here and if community lis it and passes GHI’s internal discussion then it will get added in next release.

Of course this is only if you post your code with Apache 2 license so it is inline of other code.