please click here to visit our videos
or copy this link to your browser
https://github.com/alien-ch/video/releases/download/video/video.mp4
Description of the issue and how the project slove itWith the continuous development of the aquaculture industry, aquaculture has higher requirements for water quality, and the traditional water extraction detection method is time-consuming and labor-intensive and has certain safety problems.
To avoid the risks of the traditional method, our group uses remote control UAV to detect the aquatic environment. Users can check the results with our cell phone app.
The following tools are required to run this demonstration.
- JAVA 1.8
- Arduino IDE 1.8.16
- NodeJS
- Android studio
Download the project from Github from the following link:
https://github.com/jhx2021/onem2m_we-love-bug.git
The project contains the following folders:
- onem2m-platform
- onem2m-device
- onem2m-Android-app
We use the om2m platform developed by ecplise as the CSE of our whole project,DHT11 PH detection module TS-300B sensor and WiFi modules to form our AE. The WiFi module collects sensor data and registers with the platform. Our Android retrieves sensor information by applying for a subscription to CSE.
Start the platform
Start the platform by executing the "start.bat" script on Windows or "start.sh" on Linux and Mac OS.
Login to oneM2M web interface
Open the following URL in your browser to access the oneM2M platform web interface: http://127.0.0.1:8080/webpage
Enter "Cae-admin" as originator then click on “connect” .
Connect the DHT11, PH detection module and turbidity sensor to the Nodemcu board using the following components:
- ESP8266
- Drones
- DHT11
- PH detection module
- TS-300B
Download and install arduino IDE
Download and install the Arduino IDE v1.8.16 from the following link:
Add Nodemcu board to Arduino IDE
Firstly open the Arduino IDE Go to files and click on the preference in the Arduino IDE
Copy the below URL in the Additional boards Manager URLS
http://arduino.esp8266.com/stable/package_esp8266com_index.json
click OK to close the preference Tab.
After completing the above steps , go to Tools and board, and then select board Manager
Navigate to esp8266 by esp8266 community and install the software for Arduino.
Go to Tools and board, and then select "NodeMCU 1.0" board.
Once all the above process been completed you are ready to program the nodemcu board with Arduino IDE.
Add Arduino “Timer.h” library
The “Timer.h” library is available on the zip folder “Timer-master.zip”.
Go to Sketch, and then select “include library”.
Chose the “Add .ZIP library” option
you can get the "Timer-master.zip" at onem2m-device
Configure the oneM2M sketch
Open the sketch “main.ino” in your Arduino IDE.
Set your WIFI parameters
- const char* ssid = "XXXXXXXX";
- const char* password = "XXXXXXXX";
Set the IP address of the oneM2M platform
- const char* host = "XXXXXXXX";
Compile the oneM2M sketch
Click on verify button to compile the sketch.
Compilation output:
Upload the oneM2M sketch to Nodemcu board
Click on upload button to upload the sketch to the nodemcu board.
Upload output:
Debug the code execution using serial monitor
Click on button to open the Arduino Serial Monitor to display the Nodemcu console.
Then after opening the Serial Monitor select 9600 from the drop-down list.
CSE running
check the CSE
Check IoT device resources on oneM2M web interface
You should see “mydevice1” Application Entity resource with “turbidity” “humidity" "temperature" and "pH" containers created on the oneM2M web interface.
First, please read the documentation on the official Android studio website, and then start the next operation. Download the project onem2m in GitHub_ We love bug, and then unzip it. There will be three files.
We need is onem2m-android-app, then open Android studio and open the project.
After importing, enter MainActivity to modify the following places.
Fill in the IP address of the CSE.
Add device through hashmap.
Modify it to your MCU device name
Now you can run the program.
You can see in the console whether the data read from the onem2m platform is correct
We planed to use drones to carry sensors to fly to the corresponding location for detection. However, drones cannot carry enough weight. Our model after using a remote water, return for testing. In the next step, we will add both automatic feeding functionality and remote drug spraying functionality to improve water quality and disinfect aquaculture water. The system will also provide reasonable suggestions for modification by analyzing water quality conditions and aquatic species
Comments