PSoC6 Data Collection to CSV log file
Last updated
Last updated
Assoc. Prof. Wiroon Sriborrirux, Founder of Advance Innovation Center (AIC) and Bangsaen Design House (BDH), Electrical Engineering Department, Faculty of Engineering, Burapha University
Navigate to the gesture.h
File:
Locate the gesture.h
file within the source
folder of the project directory.
Modify the Macro for Data Collection Mode:
Open the gesture.h
file.
Find the line defining GESTURE_DATA_COLLECTION_MODE
.
Change its value from 0u
to 1u
.
This change enables printing sensor data to the terminal instead of running the inference engine.
Navigate to the Makefile
:
Locate the Makefile
in the root directory of the project.
Update the Shield:
Open the Makefile
.
Look for the shield configuration line:
Change this to:
This updates the configuration to use the CY_028_SENSE_SHIELD_v2
for gathering IMU data.
Open modus-shell
Navigate to the folder and install the library.
To collect data from the sensor, use the command line as below:
ตัวอย่าง:
After data collection, the dataset is stored in the Machine_Learning_Gesture_Classification\train\gesture_data\<your gesture name> directory as a .txt file
Create project in google colab: https://colab.research.google.com/drive/1zkqpE8NGNUJv6uIUV-4ItKIbkxr1n4qj?usp=sharing
Install library
Using below code for plot the graph for each sensor dataset:
Sample Graph Outputs from the Dataset
Colab: https://colab.research.google.com/drive/1wdsgtEFlWhmXoo3XLQOzVhtO8u_F96Nt?usp=sharing
Open Colab and create your own copy before running the code:
This session in Colab is used to convert a .txt
dataset to a .csv
dataset.