Home › Forums › Mooshimeter Support › TypeError during connection with Python API › Reply To: TypeError during connection with Python API
November 8, 2016 at 11:27 am #14759
Keymaster
Ah! Thanks for pointing that out.
I looked at the Example.py script. See the lines that say:
1 2 | main_meter.sendCommand('sampling:rate 0') # Rate 125Hz main_meter.sendCommand('sampling:depth 3') # Depth 256 |
You can mess with those to change the sample rates. Right now it’s set to 125Hz, 256 samples (so about 1 sample/2seconds, just as you observed). sampling:rate 1 would give 250Hz, sampling:rate 2 would give 500Hz, etc. sampling:depth 2 gives buffer depth 128, etc. So if you change to
1 2 | main_meter.sendCommand('sampling:rate 0') # Rate 125Hz main_meter.sendCommand('sampling:depth 1') # Depth 64 |
That should give a sample every 0.5second
~James