Today, I finished implementing the first version of my primary and secondary tasks.
There are still some points to modify, especially the logging part. The original way in my program to write to a file has two main disadvantages. Firstly, it is hard to separate different participants' data, which increases difficulties in data analysis. Then, open and close files too many times waste time and decreases the speed.
Another important point to think about is how to give feedback of pen pressure to the participants.