a. Before you run the data reading script, you should change the pemission of the USB port device by the following command
sudo chmod 666 /dev/ttyUSB* // (you may change '*' into a int number 0,1,2 ...)
python3 listcom.py
a. You can also list the availiable USB device by running the <listcom.py> at your IDE or command window.
📂IMU_Python_1.0_2.0
┣ 📜WitSensor.py
┗ 📜test_read_imu_2.py
📂IMU_python_reading_3.0
┣ 📜IMU_Plotting_CSV.py
┣ 📜IMU_Reading_3.0.py
┣ 📜IMU_Reading_Recording_Plotting.py
┗ 📜WitSensor.py
📂csv
┣ 📜data_2021-09-22 20:21:33.192971_forward_ok_1.csv
┣ 📜data_2021-09-22 20:26:45.136785_forward_ok_2.csv
┣ 📜data_2021-09-22 20:32:37.902621_forward_ok_3.csv
┣ 📜data_2021-09-22 20:50:04.713883_lateral_ok_1.csv
┣ 📜data_2021-09-22 20:54:37.761909_lateral_ok_2.csv
┣ 📜data_2021-09-22 21:07:02.023691_lateral_ok_3.csv
┣ 📜data_2021-09-22 21:14:16.327567_turning_ok_1.csv
┣ 📜data_2021-09-22 21:18:19.296148_turning_ok_2.csv
┣ 📜data_2021-09-22 21:23:24.251881_turning_ok_3.csv
┗ 📜data_2021-09-28 21:54:43.609238_turning_ok_4.csv
📂fig
┣ 📜FORWARD_FIG.png
┣ 📜LATERAL_FIG.png
┣ 📜TURNING_FIG_1.png
┣ 📜TURNING_FIG_2.png
┣ 📜forward_fig_1.png
┣ 📜forward_fig_2.png
┣ 📜forward_figure_ok_1.png
┣ 📜imu_data_20210928.zip
┣ 📜imu_data_20211005.zip
┣ 📜imu_data_figure_20210927.zip
┣ 📜lateral_fig_1.png
┣ 📜lateral_fig_2.png
┣ 📜lateral_figure_ok_1.png
┣ 📜turning_fig_1.png
┣ 📜turning_fig_2.png
┣ 📜turning_figure_ok_1.png
┗ 📜turning_figure_ok_2.png
📜.gitignore
📜LICENSE
📜README.md
📜listcom.py
-
[PC] <==> [USB-TTL Adaptor] <==> [JY61 sensor]
-
pip3 install pyserial
-
run the python script <test_read_imu_2.py> to test the imu sensor. If you get IMU data stream at your terminal, then the sensor is good.
python3 test_read_imu_2.py
-
pip install pyserial
-
Python下载地址:https://www.python.org/downloads/
version : 3.0.0
- author : Can-Guo, [email protected]
- Date : 2021.09.18
- Modification 1: revision for data recording into a CSV file
- Modification 2: add a module to plot the imu data from the resultant CSV file we got before
version : 2.0.0
- intempt to implement as a function which could feedback data for N-times (mean value) -- IMU
- author : Can-Guo, [email protected]
- Date : 2021.07.14
version : 1.0.0
- initial implement