public override void Entry() { ConsoleDisplayN18.Clear(); ConsoleDisplayN18.Write("Demo Start", 0, 0); Thread.Sleep(1000); MainHandle.Context.CurrentState = new MainState(MainHandle); }
public override void Do() { _Counter++; ConsoleDisplayN18.Write("Counter = " + _Counter + "s", 50, 50); if ((_Counter % 2) == 0) { MainHandle.ButtonLeft.TurnLEDOn(); MainHandle.ButtonRight.TurnLEDOff(); } else { MainHandle.ButtonLeft.TurnLEDOff(); MainHandle.ButtonRight.TurnLEDOn(); } }
void Timer_Tick(Gadgeteer.Timer timer) { _Counter++; ConsoleDisplayN18.Write("Counter = " + _Counter + "s", 50, 50); MainHandle.LED_Strip.SetBitmask((uint)(_Counter % 65)); /*if ((_Counter % 2) == 0) * { * MainHandle.ButtonLeft.TurnLEDOn(); * MainHandle.ButtonRight.TurnLEDOff(); * } * else * { * MainHandle.ButtonLeft.TurnLEDOff(); * MainHandle.ButtonRight.TurnLEDOn(); * }*/ }