materials prepared
RTL8722DM x 1
RGB LED x 1
Android/iOS smartphone
examples
In this example, through mobile applications for BLE UART transmission to control the PWM output and change the color of the RGB LED,
As shown in the figure below, connect the RGB LED to RTL8722 development board, according to the types of leds (a total of anode/cathode), may need to share the LED pin connected to 3.3 V or GND,

Make sure your smart phone has installed support BLE UART applications,
Open the application on your phone, scan and link to display as "AMEBA_BLE_DEV" panel, and then choose the controller in the application - & gt; The color picker function,
code description
RGB values in three consecutive bytes sent, and to "! C "character as the prefix,"!" Used to indicate the following data is the command, "C" character used to indicate the data is RGB values,
demonstration video
https://www.bilibili.com/video/BV1Xz4y1o7uZ/
Want to know more details, click on: https://www.amebaiot.com/cn/amebad-arduino-ble-pwm/