please may i ask , about the led 7c,
i have a raptor board, and connected the module on the raptor connector number
9 and the power to connector 8
i just have write LED7c.SetColor(LED7.LEDCOLOR.blue);
and i have Always a faillure
i have looked at internet; but there is not a single information, on how to program that led
please can yo help me to initiate just the led7c on
@ debruyne, I don’t have a Raptor and so haven’t tried this, but if you use the visual designer to attached the module to your raptor then you should be able to address them as such:
public partial class Program
{
// This method is run when the mainboard is powered up or reset.
void ProgramStarted()
{
// Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
Debug.Print("Program Started");
new Thread(() => FlashLED()).Start();
}
private void FlashLED()
{
for (; ; )
{
led7c.SetColor(LED7C.LEDColor.Red);
Thread.Sleep(500);
led7c.SetColor(LED7C.LEDColor.Green);
Thread.Sleep(500);
led7c.SetColor(LED7C.LEDColor.Blue);
Thread.Sleep(500);
}
}
}
can I ask you to step through creating a new project for this ? On the screen where you pick your mainboard, there’s a 4.2/4.3 version drop-down selector. Can you make sure you have both 4.2 and 4.3 listed, and can you make sure you select the 4.3 option when creating your project ?
Can you also show us a screenshot of your program.gadgeteer page in VS?
(I’ve just tested a vanilla project in 4.3 and everything just worked as expected - so there’s two possibilities spring to mind, either you did 4.2 when creating the project, or you haven’t installed a recent SDK. Lets confirm the first thing first!)
You appear to have used the type and not the instance of LED7C. If you look on the designer screen, the LED is actually called led7C, not LED7C. Case is important here.