Hi, I’m working on particle sensors and planning on testing three models of them, PMS7003, PMS9003 & Tera NextPM. I was able to run all five sensors(2- PMS7003, 2- PMS9003, 1- NextPM) on UART using Raspberry Pi CM4 . I’m using multithreading method to run all sensors simultaneously and want to save all the data of the sensors in a CSV file. The problem with multi threading is sometimes it isn’t able to read all sensors and loosing 1 or 2 sensors during the starting of the program and when i re run the program then it’s able to get data from all the threads.
I need your help in how to comeup with this is issue and how to store the multithreading data in a CSV file. And also want to know are there any other methods?
Best Regards
ARa