
Before the holidays, we love decorating the house with colorful lights. In this lesson, you will learn how to use the OSOYOO IoT UDP App to control a festive LED strip light show. By the time Christmas arrives, your home will have an eye-catching display that stands out in the neighborhood.


First, plug the OSOYOO MEGA-IoT Extension Board into the MEGA2560 board:

Build the circuit as shown below:
LED strip lights → D11


Prerequisites:
Download and Edit the Lesson 2-9 Arduino Code
Step 1 Download the code from the link below and unzip it:
https://osoyoo.com/driver/smart-home-v2-udp/lesson9/smart-home-lesson9.zip
Step 2 Once the download is complete, connect the OSOYOO MEGA2560 Board to your PC with a USB cable.
Step 3 Open Arduino IDE and select the correct board type and port for your project.

Step 4 In Arduino IDE, click File → Open, navigate to the downloaded folder, and open the sketch to upload it to your Arduino.

You need to edit the code as follows:
**********************************************************
Note: In the sketch, find the code on lines 13–14 as shown:
Replace the *** with your Wi-Fi SSID and password:
char ssid[] = "***";//replace this line with your wifi ssid char pass[] = "***"; //replace this line with your wifi password
If you do not set the correct SSID and password, the project will not be able to connect to the internet.
Upload the sketch to the board.
Open the Serial Monitor. It will display your Arduino’s IP address once connected.

Open the OSOYOO IoT UDP App (if you do not have it, search for OSOYOO IoT UDP Robot App on the Apple App Store or Google Play Store).
Tap the Settings icon to enter your Arduino’s IP address, then tap Save.


Move the top slider in the app to adjust the brightness of the LED strip.
If the device appears offline, check your code, wiring, and app settings, then try again.

| No. | Picture | Device | Qty. | Link |
| 1 | ![]() |
OSOYOO MEGA2560 Board | 1 | Click here to buy |
| 2 | ![]() |
OSOYOO MEGA-IoT Extension Board | 1 | Click here to buy |
| 3 | ![]() |
Photosensitive Sensor | 1 | Click here to buy |
| 4 | ![]() |
Temp & Hum Sensor | 1 | Click here to buy |
| 5 | OSOYOO Active Buzzer Module | 1 | Click here to buy | |
| 6 | ![]() |
Flame Detection Sensor | 1 | Click here to buy |
| 7 | ![]() |
Fan Motor Module | 1 | Click here to buy |
| 8 | ![]() |
Micro Servo Motor | 1 | Click here to buy |
| 9 | ![]() |
RGB Module | 1 | Click here to buy |
| 10 | ![]() |
Ultrasonic Sensor | 1 | Click here to buy |
| 11 | PIR Motion Sensor | 1 | Click here to buy | |
| 12 | ![]() |
Microphone Module | 1 | Click here to buy |
| 13 | ![]() |
1602 I2C LCD Screen | 1 | Click here to buy |
| 14 | ![]() |
RFID Module | 1 | Click here to buy |
| 15 | ![]() |
White LED Module | 1 | Click here to buy |
| 16 | ![]() |
Red LED Module | 1 | Click here to buy |
| 17 | ![]() |
Colorful Light | 1 | Click here to buy |
| 18 | ![]() |
Red Button Module | 1 | Click here to buy |
| 19 | ![]() |
Blue Button Module | 1 | Click here to buy |
| 20 | ![]() |
Philips Screwdriver | 1 | Click here to buy |
DownLoad Url osoyoo.com