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