LORD-MicroStrain / MSCL

MicroStrain Communication Library
https://www.microstrain.com/software/mscl
MIT License
76 stars 57 forks source link

[3DM-CV7-AHRS] Serial communication with raspberry pi using usb cable #374

Open nyohkido opened 7 months ago

nyohkido commented 7 months ago

I would like to communicate between MSCL's inertial sensor 3dm-cv7-ahrs and raspberry pi 4 using a USB cable to obtain sensor data (Magnetic, Angular Rate and Gravity).

The prototype of the program I am using can be found at the path below. MSCL_Examples/Inertial/C++/MSCL_Inertial_Example_C++/MSCL_Inertial_Example_C++

Serial communication (/dev/ttyACM0) has already succeeded. Also, by making some changes to the sample code, the compilation was successful and no errors occurred during execution. However, the processing inside the for(mscl::MipDataPacket packet : packets) loop is not performed, and only the while() infinite loop is performed, so sensor data cannot be obtained. I think this is because "packets" is empty.

I suspect that there is a problem with the sample code or the settings of my raspberry pi 4. Could you please give me some advice? If you wish, I can send you a file containing my program.