- Last Active
with regard to what you posted in 2019 via Euler Angles : https://mbientlab.com/community/discussion/3087/sensor-fusion-mode#latest
I would like to find out if its possible to save the printed data on to a variable in python.
i've used the below line
euler_callback = FnVoid_VoidP_DataP(lambda context,data: f.write("epoch: %s, euler %s\n" % (data.contents.epoch, parse_value(data))))
to write to a defined csv file on my pi, then read the data from the file back into the code. this worked but i had to start/stop the sensor connection to continuously log the data and could only achieve 3 samples per second which was not practical for my application.
I'm currently looking for a way i can get the data which i assume its saved in the ( euler_callback ) unless im mistaken
when the data is printed it looks to be in a dictionary format, but if i write something like x = euler_callback ["heading"] this does not seem to work if you could kindly assist.
Much appreciated.March 11