Buy from US Buy from UK Buy from DE Buy from FR Buy from IT Buy from ES ここでご購入を!

Introduction

In this lesson, we will show you how to use the Smart Home IoT Learning Kit to build a remote family message board. You can send messages from the OSOYOO IoT UDP App to this message board wirelessly.

HARDWARE

SOFTWARE

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

Build the circuit as shown below:

Prerequisite:

If you haven’t installed the following libraries in previous lessons, download them from the links below:

In Arduino IDE, click Sketch → Include Library → Add .ZIP Library, then upload each library ZIP file.

Once all required libraries are installed, proceed to the next stage:

Download and Edit the Lesson 2-6 Arduino Code

Step 1: Download the code from the link below and unzip it:
https://osoyoo.com/driver/smart-home-v2-udp/lesson6/smart-home-lesson6.zip

Step 2: Connect the OSOYOO MEGA2560 Board to your PC with a USB cable.

Notice: Disconnect your battery or power adapter before uploading the sketch to Arduino.

Step 3: Open Arduino IDE and select the correct board type and port for your project.

Step 4: In Arduino IDE, click FileOpen, choose the code file, and load the sketch onto your Arduino.

Open the code file and replace *** 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

Make sure to enter your correct Wi-Fi SSID and password; otherwise the board cannot connect to the Internet.

Upload the sketch to the board. Wait until you see the Arduino’s IP address in the Serial Monitor. The IP address will also appear on the LCD.

In the example above, 192.168.1.81 is the IP address of the Arduino board. You will need this IP address in the next step.

APP Installation and Setup:
Step 1: If you haven’t installed the OSOYOO IoT App yet, search for “OSOYOO IoT” in Google Play or the Apple App Store and install it.
You can read the following tutorial for more information about installing the app:
https://osoyoo.com/2022/02/06/smart-house-iot-learning-kit-v2-0-lesson-1-wireless-lighting-control/#installapp

Step 2: Make sure your phone is on the same local network as the Arduino. Open the app, tap Settings, and enter the Arduino IP address from Step 4 and set Port to 8888.

Step 3: Change the F1 key value from “F” to “Hello Alice!”
Also update the Target IP address to match the Arduino’s IP address.
Then tap Save to apply the changes.

Press the F1 key and the pre-defined message “Hello Alice!” will be sent to the Arduino remotely. Your Arduino’s LCD will display something like this:
192.168.1.75
Hello Alice!

192.168.1.75 is your phone’s IP address, which tells you where the message came from.

In the app on your phone, you will see something like this:
Hello Alice! To 192.168.1.68

This is the acknowledgment message sent back from the Arduino.

Try changing the F2 key value to “Happy Birthday!” in Settings, then press F2 and see what appears on the LCD.

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