You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for example ,i have data such as AA BB 0A 0B F4
AA BB is frame head,F4 is this data of sum check
if frame head and check is right ,i will phase it ,or i will not phase it.
How to use Customize frame parser in Project Editor to phase my data.
can you give me an example ,thank you
The text was updated successfully, but these errors were encountered:
Hi! You need to write your own JavaScript code for that. I haven't tried doing this with my projects, but my rough guess would be:
You still need to use frame start/end delimiters for Serial Studio to know how to differentiate between one frame and the other.
Define a CSV-like frame format for your project and define your groups & widgets as you would normally do.
The frame parsing function takes as an input the data between the frame delimiters and returns an array. In your case, we need to parse each byte & push it to the generated array, compute the checksum and compare it with the checksum contained in the received data.
If both checksums are equal, return the generated array. If there is a difference, simply return an empty array so that Serial Studio ignores it.
Important note: I haven't really tried using Serial Studio and sending raw data directly. Later this week, I will build a simple Arduino-based example that encodes each reading from the ADC pins as a byte, add a simple 8-bit checksum & generate a Serial Studio project for that. It might be necessary for me to modify Serial Studio codebase, I'll keep you updated.
For the future, another idea for binary/hex frames would be to specify only the header byte (e.g. frame start sequence) and the index of the byte that specifies the length of the frame data.
for example ,i have data such as AA BB 0A 0B F4
AA BB is frame head,F4 is this data of sum check
if frame head and check is right ,i will phase it ,or i will not phase it.
How to use Customize frame parser in Project Editor to phase my data.
can you give me an example ,thank you
The text was updated successfully, but these errors were encountered: