GR-PEACH�}�C�R���{�[�h��̃{�^���i�X�C�b�`�j
コード例 #1
0
        /// <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);
        }
コード例 #2
0
        /// <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);
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        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;
            }
        }
コード例 #5
0
ファイル: Program.cs プロジェクト: seosoft/GrFamilyLibrary
        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;
            }
        }
コード例 #6
0
        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;
            }
        }
コード例 #7
0
 void Button_ButtonReleased(Button sender, Button.ButtonState state)
 {
     _peach.SetDebugLed(false);
 }
コード例 #8
0
 void Button_ButtonPressed(Button sender, Button.ButtonState state)
 {
     _peach.SetDebugLed(true);
 }