/// <summary> /// GR-SAKURA�̃R���X�g���N�^�[ /// </summary> public Sakura() { _led1 = new Led(Led1Pin); _led2 = new Led(Led2Pin); _led3 = new Led(Led3Pin); _debugLed = new DebugLed(Led4Pin); Button = new Button(ButtonPin); }
/// <summary> /// GR-PEACH�̃R���X�g���N�^�[ /// </summary> public Peach() { _redLed = new Led(RedPin); _greenLed = new Led(GreenPin); _blueLed = new Led(BluePin); _debugLed = new DebugLed(UserPin); Button = new Button(ButtonPin); }
static void Button_ButtonPressed(Button sender, Button.ButtonState state) { // �e�X�g�p�̃X���b�h�����삵�Ă���Δj�� if (_th != null) _th.Suspend(); // ���̃e�X�g�̑O�ɑS�Ă� LED ����� _peach.TurnAllLedsOff(); // ���̃e�X�g��n�߂� _testIndex = (_testIndex + 1) % TestMax; _th = new Thread(Tests[_testIndex]); _th.Start(); }
private void Button_ButtonPressed(Button sender, Button.ButtonState state) { _testCase = (_testCase + 1) % 2; switch (_testCase) { case 0: _accelerometer.StopTakingMeasurements(); _testTimer.Change(new TimeSpan(0, 0, 1), new TimeSpan(0, 0, 1)); break; default: _testTimer.Change(Timeout.Infinite, Timeout.Infinite); _accelerometer.StartTakingMeasurements(); break; } }
private void Button_ButtonPressed(GrFamily.MainBoard.Button sender, GrFamily.MainBoard.Button.ButtonState state) { _testCase = (_testCase + 1) % 2; switch (_testCase) { case 0: _sensor.StopTakingMeasurements(); _testTimer.Change(new TimeSpan(0, 0, 1), new TimeSpan(0, 0, 1)); break; default: _testTimer.Change(Timeout.Infinite, Timeout.Infinite); _sensor.StartTakingMeasurements(); break; } }
private void Button_ButtonPressed(GrFamily.MainBoard.Button sender, GrFamily.MainBoard.Button.ButtonState state) { _testCase = (_testCase + 1) % 2; switch (_testCase) { case 0: _sensor.Enabled = false; _testTimer.Change(new TimeSpan(0, 0, 1), new TimeSpan(0, 0, 1)); break; default: _testTimer.Change(Timeout.Infinite, Timeout.Infinite); _sensor.Enabled = true; break; } }
void Button_ButtonReleased(Button sender, Button.ButtonState state) { _peach.SetDebugLed(false); }
void Button_ButtonPressed(Button sender, Button.ButtonState state) { _peach.SetDebugLed(true); }