I'm using the PhidgetBridge 1046 to measure 4 load cells on a Raspberry Pi 3B (and 3B+) in python 2.7. In my software I measure all four channels at 125Hz and store the data into a csv file.
The problem is, that I get a different number of measurements from each channel.
I use the code below (simplified). Since the 'BrideDataHandler' is called for each single measurement (from a single load cell), there is no way to check if all sensors are sampled an equal amount of time.
When reviewing my data, I can see that there is some increasing 'drift' between the channels, which indicates that some samples are missing.
Code: Select all
# Bridge data and functions
# Bridge sensor connection
bridge = Bridge()
fileBuffer = [ for _ in range(4)]
def BridgeData(self, e):
sensor = e.index
data = e.value
def attachBridge(self, e):
# Start measurement