2011-02-17 03:06 PM
I purchased a MKI062V2 demo board and I am having trouble with the AN3138 Matlab Wrapper provided from st.com. The wrapper is for the V1 but I cannot find one for V2.
The code compiles but only streams zeros. My i32 value at the INEMO_SDK_GetSample command is 4 which means the stack of data is empty. I have started trying to adjust the iNEMO_SDK.dll to the iNEMO2_SDK.dll but the functions are different. Does anyone know how to communicate with the V2 using the Matlab Wrapper? #stevalmki062v2 #steval-mki062v22011-02-19 02:37 AM
Hi Kevin,
i've attached two matlab functions providing connection and disconnection to the device. I'm not sure that that you are looking for these kind of solutions, however i use these functions to run my Matlab algorithm and comunicate with iNemo, maybe they could be useful for you too...
Pay attention to insert in Matlab path the required libraries, specified in the files.
Bye
________________ Attachments : INEMO_Connection.m : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzXp&d=%2Fa%2F0X0000000bNQ%2FmO6i1tY_ggpIczivoqbzGszP_2uZEqawAKb_H0T.N0o&asPdf=falseINEMO_Disconnection.m : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzVf&d=%2Fa%2F0X0000000bNL%2FTpZvEv3KYseQPo6NCTHZ1JXHuBpo.FoPGtSCBGM_8pI&asPdf=false2011-02-19 04:01 PM
Thank you for the example code. Just to test if I could connect, I ran the following
[handle_dev pFD] = INEMO_Connection() [error5] = calllib('iNEMO2_SDK', 'INEMO2_IsConnect',handle_dev) I get a return of error5 = 0 so I am still not connecting. The handle_dev value is the same whether the IMU is plugged in or not. I get a warning: the data type used by structure FrameData_s does not exist. The structure may not be usable. Any pointers?2011-02-20 04:50 AM
The warning you get is due to the usage of the latest version of the library, since the functions i have written are tested with an older one. However i tried them with the latest version and, although the warning, they works the same.
Have you set the correct port number in the INEMO_Connection function as specified in the related code?
2011-02-20 03:17 PM
It works! I spent all day fiddling with things so I am not sure what exactly the problem was but it has to do with one of the following:
- The iNEMO application suite and iNEMO SDK have different versions of iNEMO2_SDK.h. I am using the SDK redestrib files. - My matlab code and the dll and .h file are all in the same folder in :C\ - The iNEMO is plugged in Anyway, thank you very much for the help, I am excited to start playing with it.2011-02-20 03:20 PM
And for anyone who has similar problems to mine, I should note that I upgraded the firmware to version 2.0.0.