Manual

Table Of Contents
Arduino Kit Demo Description 4 AdjustLED Demo
Issue V2.1 (2019-12-05) Demo Description Copyright © Yuejiang Technology Co., Ltd
10
Figure 4.3 Analog value range
Program 4.3 Define the brightness variation of LED indicator
double xValueTOAnalogScale = 1023/255; // Calculate the joystick value and transform to the
output analog value
value = SmartKit_JoyStickReadXYValue(AXISX); // Get the analog value of the X axis of the joystick
Adjust the brightness of the LED indicator over joystick.
Program 4.4 Adjust the brightness of the LED indicator over joystick
value = value / xValueTOAnalogScale;
analogWrite(LED_REDPIN, value); //Adjust the brightness of the LED indicator