Manual

Table Of Contents
Arduino Kit Demo Description 5 Button Demo
Issue V2.1 (2019-12-05) Demo Description Copyright © Yuejiang Technology Co., Ltd
11
Button Demo
Introduction
This demo uses three different colored buttons to turn on and off the corresponding colored
LED indicators respectively.
Hardware Connection
The three buttons, three LED indicators and Arduino Mega250 are required in this demo.
Figure 5.1 shows its connection process.
Figure 5.1 ButtonLED Connection
NOTE
If you connect the skill kit to other interfaces on the Arduino Mega2560, you also need
to modify the right interfaces that the skill kit connects to in the SmartKit.h file.
Program 5.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