You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attempted to start logging data with specific parameters for the accelerometer and the gyroscope on my MMC board. The accelerometer settings are 25 Hz and 2.0 range and the gyroscope settings are 25 Hz and 2000.0 range.
After I stop the logging, I attempt to download the logged data and that is when I get the error shown in the traceback message.
My Code
from __future__ importdivisionfrom __future__ importprint_functionfrom __future__ importabsolute_importimporttimefrompymetawear.clientimportMetaWearClientfrompymetawear.exceptionsimportPyMetaWearException, PyMetaWearDownloadTimeoutimportpandasaspdclient=MetaWearClient('E6:36:15:BD:D1:44', debug=False)
print("Write accelerometer settings...")
client.accelerometer.set_settings(data_rate=25.0, data_range=2.0)
client.gyroscope.set_settings(data_rate=25.0, data_range=2000.0)
client.accelerometer.high_frequency_stream=Falseclient.gyroscope.high_frequency_stream=Falseclient.accelerometer.start_logging()
client.gyroscope.start_logging()
print("Logging accelerometer and gyroscope data...")
time.sleep(10.0)
client.accelerometer.stop_logging()
client.gyroscope.stop_logging()
print("Logging stopped.")
print("Downloading accelerometer data...")
download_done=Falsen=0data=Nonewhile (notdownload_done) andn<3:
try:
data=client.accelerometer.download_log()
download_done=TrueexceptPyMetaWearDownloadTimeout:
print("Download of log interrupted. Trying to reconnect...")
client.disconnect()
client.connect()
n+=1ifdataisNone:
raisePyMetaWearException("Download of logging data failed.")
df=pd.DataFrame(data)
df.to_csv('Accelerometer_10.csv')
time.sleep(5.0)
print("Downloading gyroscope data...")
download_done=Falsen=0dataG=Nonewhile (notdownload_done) andn<3:
try:
dataG=client.gyroscope.download_log()
download_done=TrueexceptPyMetaWearDownloadTimeout:
print("Download of log interrupted. Trying to reconnect...")
client.disconnect()
client.connect()
n+=1ifdataisNone:
raisePyMetaWearException("Download of logging data failed.")
df2=pd.DataFrame(dataG)
df2.to_csv('Gyroscope_10.csv')
print("Disconnecting...")
client.disconnect()
What I Did
From my understanding based on the traceback error message shown below is that in the pymetawear.modules.base.py the default callback only takes one argument and that is why only the accelerometer data is downloaded and the traceback error is given.
So it would be a logical assumption that if that issue is solved then it would work. But I wanted to ask if there is another way to log the data of different sensors on the MMC and download them without going through that hassle.
Description
I attempted to start logging data with specific parameters for the accelerometer and the gyroscope on my MMC board. The accelerometer settings are 25 Hz and 2.0 range and the gyroscope settings are 25 Hz and 2000.0 range.
After I stop the logging, I attempt to download the logged data and that is when I get the error shown in the traceback message.
My Code
What I Did
From my understanding based on the traceback error message shown below is that in the pymetawear.modules.base.py the default callback only takes one argument and that is why only the accelerometer data is downloaded and the traceback error is given.
So it would be a logical assumption that if that issue is solved then it would work. But I wanted to ask if there is another way to log the data of different sensors on the MMC and download them without going through that hassle.
Thank you.
The traceback error message:
The text was updated successfully, but these errors were encountered: