Embedding Matlab program to X4M03

Discussion in 'General' started by Shihab Khan, Jan 19, 2018.

  1. Shihab Khan

    Shihab Khan New Member

    Hi,

    I'm sorry if this has been asked before but I couldn't find much information on it. I would like to use the X4M03 to monitor heart rates, and plan to use the raw data from the sensor and process the data on Matlab. Would that be possible? If so, can you please advise me on:
    1. the (physical) connections I have to make (I'm guessing just using the COM port?)
    2. how to embed the Matlab program to the X4M03
    3. whether there are any packages to interface X4M03 with Matlab?

    Any alternative suggestions would be highly appreciated as well.

    Thank you
     
    xiaopeng likes this.
  2. Charlie Shao

    Charlie Shao Moderator Staff Member

    Hi Shihab Khan,

    1. Yes, you need to check Device Manager to find the COM port number.
    2. Please check with Matlab about how to convert Matlab algorithm to an embedded system.
    3.You can start from Module Connector, it provides APIs support Matlab script. XEP_X4_plot_frame.m would be a good example.
     
  3. Shihab Khan

    Shihab Khan New Member

    Hi Charlie,

    Seeing as I have not had much success with doing this on Matlab, I'm now trying to work with the raw (reflected) signal using C in atmel and a debugger. Can you advice me on how to get the raw signal using C and do some post processing (clutter removal, noise reduction, FFT etc.)?
     
  4. Charlie Shao

    Charlie Shao Moderator Staff Member

  5. Shihab Khan

    Shihab Khan New Member

    The solution does not build and hence I cannot get a .hex file to program onto the board. Can you please tell me how to solve the build error? There is nothing wrong with the directory as I access the solution file directly. A snapshot of the error is attached below.
     

    Attached Files:

  6. Charlie Shao

    Charlie Shao Moderator Staff Member

    Dear Shihab,

    This error seems caused by compiler setting.
    Did you make any change to the compiling configuration? Please try to reinstall Atmel Studio and download the
    XEP distance demo again, makes sure that the directory path only contains English name.
     
  7. FARAH Said

    FARAH Said New Member

    Hi Charlie,
    I am a new user of the X4M03 module, can you tel me how to download examples like XEP_X4_plot_frame.m ?
    Best regards
    Said Farah
     
  8. Charlie Shao

    Charlie Shao Moderator Staff Member

    They are included in ModuleConnector\matlab\examples, you just need to download ModuleConnector.