You can download the user manual from:

https://osoyoo.com/manual/OSOYOO_Smart_House_IoT_Learning_Kit_V2.0-Tutorial.pdf

Buy from US Buy from UK Buy from DE Buy from FR Buy from IT Buy from ES Buy from JP

Here, we will show how to use OSOYOO Smart Home IoT Kit with Blynk APP to control some electronic devices, such as leds, active buzzers, fan modules,relay modules, etc.

In this lesson, we will learn how to use Blynk to remotely turn on or turn off the LED and control the brightness of the LED. . . Using the same principle, you can also control other electronic devices

HARDWARE

SOFTWARE

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

Connect the LED Module to the D2 port as below:

Step 1 Please get your Blynk AuthToken. Download Blynk APP, after create new project, you’ll receive the Auth Token.

If you haven’t receive the Auth Token, you can follow this:

Note: Please save your Auth Token, it is needed for lessons after this.

Step 2 Install latest Arduino IDE (If you have Arduino IDE version after 1.1.16, please skip this step)

Download Arduino IDE from https://www.arduino.cc/en/Main/Software?setlang=en , then install the software.

Step 3 WifiEsp Library Installation (if you have installed WifiESP library, please skip this step)

OSOYOO MEGA-IoT extension TX/RX pin to Arduino A9/A8 pin by default. So in Arduino sketch code, we need use Software Serial Port to communicate with ESP8266 (set A9 as TX and A8 as RX in softwareserial object).

To use this wifi shield in Arduino IDE, we need download WiFiEsp-master library from following link:
https://osoyoo.com/driver/WiFiEsp-master.zip

You need go to Arduino IDE ->Sketch ->Include Library ->Add ,Zip library to load above zip files into Arduino IDE.

Step 4 After installing above library, please download the code from following link, unzip it:
https://osoyoo.com/driver/Smart_House_IoT_Learning_Kit_V2.0_code/lesson2-1.zip

Step 5 After above operations are completed, connect OSOYOO MEGA2560 Board to PC with USB cable.

Notice: Shut off your battery or unplug your power adapter when upload sketch code to Arduino.

Step 6 Open Arduino IDE:  Choose corresponding board type and port type for you project .

Step 7  Arduino IDE:  Click file – Open, then choose code in the folder, load up the  sketch onto your Arduino.

Note: In the  sketch, find these lines as following:

char auth[] =”YourAuthToken”;

This is the Auth Token that you emailed yourself.(Step 1) Please check your email and copy it, then paste it inside the quotation marks.

It should look similar to this:

char auth[] = “f45626c103a94983b469637978b0c78a”;

Then find these lines:

char ssid[] = "******"; // your network SSID (name)
char pass[] = "******"; // your network password

please replace the ****** with your correct wifi SSID and password, otherwise your project can not connect to Internet.

Upload the sketch to the board. Wait until you see something like this:

Done uploading

Congratulations! You are all ready! Your hardware is now connected to the Blynk cloud!

App project setup

Open your project page and press the “+” button to add  the “Button” Widget.

Button Widget settings:

Name Column: You can name your button widget, whatever you like.

OUTPUT: D2 |  0-1

MODE: We choose the Switch mode here.

You can modify other options according to your own habits or keep them as default.

Then back to the project page. and press the “” button to start your project.

Press the Button on the project page and you will find that the LED connected to D2 has been lit.

Press the Button again, the LED will be extinguished.

While in PLAY mode, you won’t be able to drag or set up new widgets, press “”  and get back to EDIT mode.

If you find the device is offline, please check your code, wiring and app settings, and try again.

 

Remotely control the brightness of the LED

In this section we will introduce how to control the brightness of the light through this kit and Blynk APP.

The wiring and code of this experiment are the same as the previous part, we only need to add a new widget.

App project setup

Open your project page and press the “+” button to add  the “Slider” Widget.

Slider Widget settings:

Name Column: You can name your button widget, whatever you like.

OUTPUT: D2 |  0-255

You can modify other options according to your own habits or keep them as default.

Running Result

After you finished all above operations,open the Serial Monitor and you will see the connection situation,then open the Blynk APP, press the PLAY button ““. This will switch you from EDIT mode to PLAY mode where you can interact with the hardware.

While in PLAY mode, you won’t be able to drag or set up new widgets, press “” and get back to EDIT mode.

Slide the slider to change the brightness of the LED module connected to D2. When the slider is on the far left, the LED is off, and when the slider is on the far right, the LED is brightest.

If you find the device is offline, please check your code, wiring and app settings, and 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