SmartSleepIoT/SmartSleepCoding

Create a read class for each sensor

Closed this issue · 0 comments

Right now we have just one read sensor class that posts all the data:
https://github.com/SmartSleepIoT/SmartSleepCoding/blob/main/Standalones/readSensorData.py#L7-L14
The problem is that real sensors would send data to the app at the same time, which doesn't happen in our case. In our implementation, for example, we get the temperature data only after the sound data is posted, which could therefore lead to timestamp synchronization problems.

Create for each sensor a read class.
Note: We could keep the existing class without the post_data_* methods. All the other read classes we create can be derived from this main class and override a method called post_data.