Arduino Meg2560 Example Tutorial
Last updated
Last updated
JY61P、JY901B、JY901S、WT931、HWT906-TTL/232、WT901C-TTL/232、WT61PC-TTL/232、SINDT-TTL/232、HWT901B-TTL/232、HWT605-TTL/232、HWT905-TTL/232、WTGAHRS1、WTGAHRS2、WTGAHRS3
The above products are suitable for this tutorial
(sample program)
Copy the downloaded program to the library folder of Arduino, otherwise the file will not be found when compiling later
There is no need to connect our product when compiling the program. If it is connected, it will occupy the download serial port and cause the download to fail and report an error.
1、Select Tools->Choose com port->Then select the model of the development board "Arduino mega or mega2560", and finally select to obtain the development board information. If the board information is successfully obtained, there is no problem.
2、Select Tools -> Programmer -> select Arduino as spi
The baud rate corresponds to the product baud rate jy901 is 9600 baud rate (JY61 is 115200)
The board is connected to the computer separately, check the above steps, click upload if there is no problem, and there will be a prompt that the upload is complete after the upload has a progress bar. (The board is connected to the computer, the sensor should not be connected to the board)
When wiring, the serial port wiring needs to be connected to the TTL interface on the board. The wiring is as follows
VCC is connected to 5v, TX is connected to RX, RX is connected to TX, and GND is connected to GND.
Connect the arduino board to the computer, and then use the serial port tool to view the data without checking the hexadecimal system.
If the output is garbled, the baud rate is wrong
If the output data are all 0, it may be that the baud rate of the sensor and the program baud rate in the board are not aligned, it is 0, because the baud rate of the board and the sensor are not aligned. As a result, the communication fails and the data cannot be obtained, so the output is all 0; it is also possible that the pin headers of the board are not welded properly, which will also cause the output data to be 0.