Driving the Joulescope with a Raspberry Pi 4 Model B.
From Python, I am using it pretty simply
joulescope_device = scan_require_one(config='auto')
with joulescope_device:
data = joulescope_device.read(contiguous_duration=duration)
current, voltage = np.mean(data, axis=0, dtype=np.float64)
I call this with duration set to 0.1. After running this several times in a row, with maybe a half second between iterations, I begin to get the following:
not enough memory: reducing duration from 30 to 29
Followed by:
not enough memory: reducing duration from 30 to 3
Until finally, I am thrown an error:
File "/home/pi/ICT/venv/lib/python3.9/site-packages/joulescope/driver.py", line 1309, in __enter__
self.open()
File "/home/pi/ICT/venv/lib/python3.9/site-packages/joulescope/driver.py", line 551, in open
self._stream_buffer_open()
File "/home/pi/ICT/venv/lib/python3.9/site-packages/joulescope/driver.py", line 526, in _stream_buffer_open
self.stream_buffer = StreamBuffer(stream_buffer_duration, reductions,
File "joulescope\stream_buffer.pyx", line 482, in joulescope.stream_buffer.StreamBuffer.__cinit__
ValueError: length to small
It is rare to get this to repeat exactly, but the Joulescope is almost always reducing the measurement duration.
Any thoughts or recommendations on how to take fairly frequency small measurements?