logston / olimex-ekg-emg

A Python package for gathering data from the Olimex EKG/EMG Shield.
Other
17 stars 7 forks source link

Don´t get any Data from the Shield #2

Closed awakefox closed 8 years ago

awakefox commented 9 years ago

print (data) gives me: [ 0. 0. 0. ..., 0. 0. 0.] [ 0. 0. 0. ..., 0. 0. 0.] .... so the graph doesn´t move at all.

While the Arduino and Shield are working fine and writing Data:

A5 5A 2 2 0 60 2 A0 ....

I set the default baudrate to 57600 and 115200. Didn´t help. Tested it on Win7 with Python 3.4.

logston commented 9 years ago

Thanks for posting the issue. Can you tell me what version of this package you are using? Did you pip install from pypi or did you use the trunk of this repo?

awakefox commented 9 years ago

I use the repo, Set it up as new Project in the PyCharm IDE. Package 0.1.2. and also tried 0.1.0. The plot is chrasing immediately in 0.1.0. Thanks.

logston commented 9 years ago

How are you running the code in this package? Are you running

>>> from olimex.gui import show_exg
>>> show_exg('/path/to/port')

inside of a Python REPL or are you somehow getting PyCharm to run the necessary code?

awakefox commented 9 years ago

Thank you for replying.

I did both.

Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32

from olimex.gui import show_exg Backend TkAgg is interactive backend. Turning interactive mode on. show_exg('com3')

and

if name == 'main': show_exg('com3')

nothing happend in the plot.

logston commented 9 years ago

I've just update this project to include a command line script. Can you download the long.bin binary file in this project's mock-data directory and run the following command at the command line?

$ exg -f long.bin

This should produce the same graph that a connected Arduino would produce. I've tried this command with the long.bin file on a Windows 7, python 3.4.3, olimex-ekg-emg==0.1.4 and a graph was produced as expected.

You will need to update olimex-ekg-emg to 0.1.4 for the exg script to be available at the command line.

pip install -U olimex-ekg-emg