Data logging with Python

Has anyone succeeded in logging data using the python-wrapped C++ API? I get a ctype error when trying to create the logger:

argument 2: <type 'exceptions.TypeError'>: expected CFunctionType instance instead of CFunctionType

raised at the following line:

libmetawear.mbl_mw_datasignal_log(c.accelerometer.data_signal, Fn_VoidPtr(loggerCallback))

where the definition of loggerCallback looks like

def loggerCallback(logger):
<some code here>

I interpret this error to mean the second argument of libmetawear.mbl_mw_datasignal_log is not of type Fn_VoidPtr, but that seems to contradict the definition in functions.py

Where am I going wrong?

Comments

This discussion has been closed.