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

In this lesson, we will make a complex Capstone project which will use many of our previous knowledge. We will make two groups of sensors and actuators installed on two MEGA-IoT shields  (to make things simple, we call Device A and Device ). We also need use ArduinoJson Library which can use short string to transfer data through json format.

The project has following functions:

Device A has DHT 11 temperature sensor which will send data to Device B and display temperature/humidity value in 1602 LCD in Device B.
Device A has Gas Sensor   which will send data to Device B . If Gas is detected , buzzer in Device B will alarm.
Device A has RFID module which can send IC card ID to Device B 1602 LCD .
Device B has Red LED which can be turned on/off by push buttons in Device A.

OSOYOO MEGA2560 Board x 2
OSOYOO MEGA-IoT extension board x 2
USB Cable x 2
Red LED PnP module x 2
Push Button PnP Module x 2
I2C 1602 LCD PnP module x 1
Gas detection PnP module x 1
RFID modules x 1
Buzzer PnP module x 1

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

Then connect the modules with two  OSOYOO MEGA-IoT Extension Boards (Device A&Device B) with PnP cables as below.

(Jumper Cap should connect ESP8266 RX with A8, TX with A9)

Modules – Device A
DHT11 – D2
RFID Module – RFID
Gas Sensor –  A3
Push Button Module – D7

Modules – Device B
1602 LCD Module – I2C
Buzzer Module – D5
Red LED Module – D11

Step3 Open Arduino IDE ->Sketch ->Include Library ->Add ,Zip library to load above zip files into Arduino IDE.

In sketch deviceB,  you need change Wifi SSID and password in Line 22,23, you also need set device A IP address in line 26.

Now check the LCD which is connected to I2C 1 slot of Device B, it will show Temperature, Humidity and RFID# which is sent from Device DHT11 sensor and RFID module.

Red LED in Device B which can be turned on/off by push buttons in Device A.

let’s use a gas lighter to leak some gas  to gas sensor, buzzer in Device B will alarm.

You can add some more sensors and actuators in this project and make far more complex IoT projects. If you have any question, feel free to contact support@osoyoo.info to get help.