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 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