/// <summary> /// Lチカ /// </summary> private static void SetLedTest() { Debug.Print("Running SetLedTest()"); while (true) { _sakura.SetDebugLed(true); Thread.Sleep(1000); _sakura.SetDebugLed(false); Thread.Sleep(1000); } }
public static void Main() { _sakura = new Sakura(); while (true) { if (_sakura.Button.IsPressed) { _sakura.SetDebugLed(true); Debug.Print("Button Pressed"); } else { _sakura.SetDebugLed(false); Debug.Print("Button Released"); } Thread.Sleep(200); } }
void Button_ButtonPressed(Button sender, Button.ButtonState state) { _sakura.SetDebugLed(true); }