no one answer to this question?
i can recived bytes from serialTTL but i cant seperate bytes and i get just data,
Three, serial parameters and instructions
3.1 serial parameters
Serial baud rate: 115200, parity bit: No, stop bit: 1 bits.
3.2 serial data packet protocol
Packet format: start + Command + data + check value. The total length of a frame is 6 bytes.
-
starting symbol: BBAA, 2 byte length (0xBB, 0xAA);
-
command: 1 byte length;
00, return to the module software version number command;
01, return the decibels data command;
-
data: 2 byte length, software version information and decibel value data are stored in some data segments.
-
check value: 1 byte length, initiating symbol, command and data arithmetic and check, not exceeding 256 overflow value.
Four. Communication command description
4.1 module software version number command
Such as: BB AA 00020067
The starting point: BB AA, which represents the beginning of a frame;
Command: 00, indicating that this frame is the frame of the software version number of the return module.
Data: 0200, indicating that the version number of module software is 2;
Check value: 67, arithmetic and check value for BB, AA, 00, 02, 00.
Note: this frame is the first returned packet after the module is powered up and returns only after power on.
4.2 decibels data command
Such as: BB AA 01 7F 02 E7
The starting point: BB AA, which represents the beginning of a frame;
Command: 01, indicating that this frame returns DB values.
Data: 7F 02, which indicates the decibel value is 63.9dB. The low byte is in front, the high byte is in the back, and each unit is 0.1dB;
Check value: E7, arithmetic and check value for BB, AA, 01, 7F, 02.
Note: this frame returns the frame once every 500ms after the module returns the software version number command frame.