In this lesson, we will show how to use OSOYOO Wifi UDP APP to control LED.



LEDs – those blinky things. A must have for power indication, pin status, opto-electronic sensors, and fun blinky displays.

This is a pack of basic red, yellow, white and green 5mm LEDs (6 of each) all conveniently packaged in a nice reusable ESD safe bag.




In this lesson,we use D2(GPIO4) to control the led,the connection is as below:


Software Installation

Upload Sketch

Connect the OSOYOO Basic board to your computer using the USB cable. The green power LED (labelled PWR) should go on. Open the Arduino IDE and select corresponding board type and port type for your OSOYOO Basic board.

Download the sketch file from

Unzip above file, replace Line 18,19 with your own wifi SSID and password

Then upload the sketch code to Arduino IDE, you will see the IP address of your NodeMCU board.

In above example, the NodeMCU IP is , please Write down the IP address of your NodeMCU.

APP Installation and Setting

Download OSOYOO IoT APP  by searching OSOYOO iot udp robot car app from Apple Store(iPhone/iPad) or Google Play Store(Android device)

Save NodeMCU IP address into the APP Setting :
1)Open APP, click Setting button in upper right corner

2)Use the NodeMCU IP address  to replace default IP

3)keep default port number 8888 without changing

4)Click Save button to save the changes you just made
5)Click Back Arrow to go back APP front UI

Running Result

Now Go back to Home Page of your APP

Press F1 button, the LED will turn ON

In the same time , your Arduino IDE serial monitor will show something similar to following:

Received packet of size 1 from
(to, free heap = 42072 B)

Press F2 button, the LED will turn OFF

Received packet of size 1 from
    (to, free heap = 42072 B)

Part details

SKU:  DKRK100700

No. Picture Name Link
1 OSOYOO NodeMCU Board
2 Servo motor
3 LED(6 x White, 6 x Red, 6 x Yellow, 6x Green)
4 Buzzer
5 Push Button and Hats
6 Photoresistor(Light Sensor)
7 potentiometer(10K lohm adjustable resistor)
8 I2C LCD Display (16*2)
9  Temperature&Humidity Sensor Module
10 Resistors
11 4*AA Battery Holder Box
12 4 LED Module
13 Stepper Motor +Bridge
14 Tlit Sensor Module
15 Infrared Remote Controller