Manual
Table Of Contents
- 1. Introduction
- 2. FlickerLED Demo
- 3. AlarmLED Demo
- 4. AdjustLED Demo
- 5. Button Demo
- 6. SeedVoiceLED Demo
- 7. MoveBlock Demo
- 8. SeedVoiceDobot Demo
- 9. JoyStick Demo
- 10. DobotPixy Demo
- Appendix A Common Function Description
- Appendix B Installing Suction Cup Kit
- Appendix C Pixy Install and Configure Pixy
- Appendix D Vision Recognition Initialization Process
- Appendix E Multiplexed I/O Interface Description of V1 Dobot Magician
- Appendix F Multiplexed I/O Interface Description of V2 Dobot Magician
Arduino Kit Demo Description 9 JoyStick Demo
Issue V2.1 (2019-12-05) Demo Description Copyright © Yuejiang Technology Co., Ltd
28
Program 9.1 Define the interfaces that the skill kit connects to
#define JOYSTICK_XPIN 7 // Interface that the X-axis of the JoyStick connects to
#define JOYSTICK_YPIN 6 // Interface that the Y-axis of the JoyStick connects to
#define JOYSTICK_ZPIN A5 // Interface that the Z-axis of the JoyStick connects to
#define LED_REDPIN 9 // Interface that the red LED indicator connects to
#define LED_GREENPIN A1 // Interface that the green LED indicator connects to
#define LED_BLUEPIN A3 // Interface that the blue LED indicator connects to
#define BUTTON_REDPIN A0 // Interface that the red button connects to
#define BUTTON_GREENPIN A2 // Interface that the green button connects to
#define BUTTON_BLUEPIN A4 // Interface that the blue button connects to
Realization Process
In this demo, we move Dobot Magician forward, backward, left and right by moving joystick
along X-axis or Y-axis, control the moving speed by joystick button, move Dobot Magician upward
by red button, move Dobot Magician downward by green button and control the air pump start-stop
by blue button. Figure 9.3 shows its realization process.