0% found this document useful (0 votes)
5 views

Instructions for Connecting Sensor to Arduino

This document provides a step-by-step guide for connecting a JY-901 module to an Arduino Mega 2560 for testing. It includes hardware setup instructions, software installation, and program compilation steps. The final output can be observed using a serial port debugging assistant with a baud rate set to 9600.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Instructions for Connecting Sensor to Arduino

This document provides a step-by-step guide for connecting a JY-901 module to an Arduino Mega 2560 for testing. It includes hardware setup instructions, software installation, and program compilation steps. The final output can be observed using a serial port debugging assistant with a baud rate set to 9600.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Link to Arduino sample code.

https://www.dropbox.com/s/ozvarbfg7y5qaz8/Arduino%20code.zip?dl=0

Arduino (Mega 2560) and JY-901 connection test


step 1 preparation
Hardware equipment: JY-901 module, Arduino Mega2560 development board.
Software equipment: Download the Arduino software on the official website (download URL:
https://www.arduino.cc/en/Main/Software#) and install it.

2 hardware connection
First connect the Arduino Mega 2560 to the computer using a data cable. The JY-901 is connected to the Arduino
MEGA2560 using a DuPont cable. Connect the JY-901 module to the Arduino MEGA 2560 development board. Note that
only three pins are connected: TX-TX1 (19th pin), GND-GND, VCC-5V, JY-901 on the front, and Arduino MEGA 2560 on
the back. The pins on the board. Note: The RX of JY-901 cannot be connected to the RX of ArduinoMEGA 2560. The
connection is as shown below:
3 software testing
1) Open the sample program and extract the JY901.zip file and copy the extracted folder JY901 to
the Arduino library installation directory: C:\Program Files(x86)\Arduino\libraries.
2.) Open the already installed software ArduinoIDE, click File->Examples->JY901, and select the
corresponding instance program.
3) Compile and download the program. Before compiling the program, select the development board Arduino MEGA
2560 in the “Tools” column, then select the development board and the computer to get the port number, and then
download the program to the Arduino MEGA 2560 board. It can be seen that the LED lights of the TX port and the RX
port are blinking. Select the development board as shown below:
Note: The specific port number should be viewed at the port of the device manager of the computer.

Compile and download the program to the board


4 output results display
Connect the board correctly on the computer, first open the software serial port debugging assistant, first close the
Arduino port, find the corresponding port in the serial port assistant, then open the serial port, note that the baud rate
is set to 9600, then you can observe the left side The window has data output. as the picture shows:

You might also like