Bluetooth Controlled RGB Light

by xidameng in Circuits > Arduino

363 Views, 2 Favorites, 0 Comments

Bluetooth Controlled RGB Light

Ameba RTL8722 BLE UART Controls RGB LED

Was there times when you wanna change the color and brightness of the your house light with just a few touches on your phone? Good news is--this can be done easily using a Bluetooth-enabled microcontroller like Ameba RTL8722 from Realtek. Here I am gonna show you just how~

Supplies

  • Ameba D [RTL8722 CSM/DM] x 1
  • RGB LED
  • Android / iOS smartphone

Connection

1.png

Refer to the picture above to create connection between microcontroller and RGB light

Code

2.png

Code is caring done for you already, just use arduino IDE to download ameba board package and library ( for details please refer to the official guide at https://www.amebaiot.com/cn/amebad-arduino-getting...

Then follow the picture above to download the code into ameba board.

Demo

3.png
4.png
5.png
6.png

For this project, a smartphone app is used to transmit commands over BLE UART to control the PWM outputs and change the color of a RGB LED.

Thus, ensure that the required app is installed on your smartphone, it is available at:

– Google Play Store:https://play.google.com/store/apps/details?id=com.adafruit.bluefruit.le.connect

– Apple App Store:https://apps.apple.com/us/app/bluefruit-connect/id830125974

Open the app on your smartphone, scan and connect to the board shown as “AMEBA_BLE_DEV” and choose the controller -> color picker function in the app.

Using the color selection wheel, saturation, and brightness sliders, choose a desired color and click select to send the RGB values to the board. You should see the RGB LED change to the matching color.