Manual

Table Of Contents
Arduino Kit Demo Description 4 AdjustLED Demo
Issue V2.1 (2019-12-05) Demo Description Copyright © Yuejiang Technology Co., Ltd
9
#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
This demo controls the brightness of the LED indicator by moving the joystick along X-axis.
Figure 4.2 shows its realization process.
Figure 4.2 Realization process
Critical Code Description
Before debugging this demo, please select SmartKit library on the Sketch > Include Library
menu.
Initialization.
Program 4.2 Initialization
void setup(){
SmartKit_Init(); //Initialization
}
Define the brightness variation frequency of LED indicator.
NOTE
When moving joystick along X-axis or Y-axis, the analog values change from 0 to 1023,
as shown in Figure 4.3. The homing position of the joystick is at (x,y: 512,508).