OpenBCI_Python confusions...

Edgargc26Edgargc26 Bogotá
edited February 2019 in Software
Hi! I am new using python, and I am having troubles for making it works. Sorry if this topic is already posted, i didnt see anything while looking.

So well, I am trying to get EMG signals using the GitHub of OpenBCI avaible for python. But I am having some errors. I already install all the requirements, and I am avaible to use the script test.py. So I can get the signals from my cyton, and printed in the console (I am using the interface Sublime Text3). However, this printed command enter in a infinite loop, so I want to know how can I stop it.

In addition, when I use the script User.py, it appers to work, but when I try to use the pluggins commands, it didnt work and appear to have an error asociated to a SD card. I must have this card in order to get signals, print or stream? Below are the copy/paste of all the proccess until the error message appear (The pluggins appear in the list so I feel it not an error asociated with it).

I am using the Cyton board of 8 channels, the OpenBCI_Python GitHub, and running in a Windows 10 System with Sublime Text 3.

------------user.py-------------
WARNING: no plugin selected, you will only be able to communicate with the board. You should select at least one plugin with '--add [plugin_name]'. Use '--list' to show available plugins or '--info [plugin_name]' to get more information.
Board type: OpenBCI Cyton (v3 API)
Will try do auto-detect board's port. Set it manually with '--port' if it goes wrong.

------------SETTINGS-------------
Notch filtering:True
user.py: Logging Disabled.

-------INSTANTIATING BOARD-------
Connecting to V3 at port COM3
Serial established...
OpenBCI V3 8-16 channel
On Board ADS1299 Device ID: 0x3E
LIS3DH Device ID: 0x33
Firmware: v3.0.0
$$$
No daisy:
8 EEG channels and 3 AUX channels at 250.0 Hz.

------------PLUGINS--------------
Found plugins:
[ streamer_osc ]
[ noise_test ]
[ udp_server ]
[ streamer_tcp ]
[ sample_rate ]
[ streamer_lsl ]
[ csv_collect ]
[ print ]


--------------INFO---------------
User serial interface enabled...
View command map at http://docs.openbci.com.
Type /start to run (/startimp for impedance 
checking, if supported) -- and /stop
before issuing new commands afterwards.
Type /exit to exit. 
Board outputs are automatically printed as: 
%  <tab>  message
$$$ signals end of message

-------------BEGIN---------------

--> /start
No function loaded

--> ?
%
% Board ADS Registers
% ADS_ID, 00, 3E, 0, 0, 1, 1, 1, 1, 1, 0
% CONFIG1, 01, 96, 1, 0, 0, 1, 0, 1, 1, 0
% CONFIG2, 02, C0, 1, 1, 0, 0, 0, 0, 0, 0
% CONFIG3, 03, EC, 1, 1, 1, 0, 1, 1, 0, 0
% LOFF, 04, 02, 0, 0, 0, 0, 0, 0, 1, 0
% CH1SET, 05, 68, 0, 1, 1, 0, 1, 0, 0, 0
% CH2SET, 06, 68, 0, 1, 1, 0, 1, 0, 0, 0
% CH3SET, 07, 68, 0, 1, 1, 0, 1, 0, 0, 0
% CH4SET, 08, 68, 0, 1, 1, 0, 1, 0, 0, 0
% CH5SET, 09, 68, 0, 1, 1, 0, 1, 0, 0, 0
% CH6SET, 0A, 68, 0, 1, 1, 0, 1, 0, 0, 0
% CH7SET, 0B, 68, 0, 1, 1, 0, 1, 0, 0, 0
% CH8SET, 0C, 68, 0, 1, 1, 0, 1, 0, 0, 0
% BIAS_SENSP, 0D, FF, 1, 1, 1, 1, 1, 1, 1, 1
% BIAS_SENSN, 0E, FF, 1, 1, 1, 1, 1, 1, 1, 1
% LOFF_SENSP, 0F, 00, 0, 0, 0, 0, 0, 0, 0, 0
% LOFF_SENSN, 10, 00, 0, 0, 0, 0, 0, 0, 0, 0
% LOFF_FLIP, 11, 00, 0, 0, 0, 0, 0, 0, 0, 0
% LOFF_STATP, 12, 00, 0, 0, 0, 0, 0, 0, 0, 0
% LOFF_STATN, 13, 00, 0, 0, 0, 0, 0, 0, 0, 0
% GPIO, 14, 0F, 0, 0, 0, 0, 1, 1, 1, 1
% MISC1, 15, 00, 0, 0, 0, 0, 0, 0, 0, 0
% MISC2, 16, 00, 0, 0, 0, 0, 0, 0, 0, 0
% CONFIG4, 17, 00, 0, 0, 0, 0, 0, 0, 0, 0
%
% LIS3DH Registers
% 0x07 00
% 0x08 00
% 0x09 00
% 0x0A 00
% 0x0B 00
% 0x0C 00
% 0x0D 00
% 0x0E 00
% 0x0F 33
%
% 0x1F 00
% 0x20 08
% 0x21 00
% 0x22 00
% 0x23 18
% 0x24 00
% 0x25 00
% 0x26 00
% 0x27 00
% 0x28 00
% 0x29 00
% 0x2A 00
% 0x2B 00
% 0x2C 00
% 0x2D 00
% 0x2E 00
% 0x2F 20
% 0x30 00
% 0x31 00
% 0x32 00
% 0x33 00
%
% 0x38 00
% 0x39 00
% 0x3A 00
% 0x3B 00
% 0x3C 00
% 0x3D 00
$$$
--> --add print
Success: Configured internal test signal.$$$Success: Configured internal test signal.$$$
--> /start
No function loaded

--> --add print
Failure: Board RFduino buffer overflowed. Soft reset command sent to Board.$$$
--> --add print

--> 
--> --add print
% Failure: Board RFduino buffer overflowed. Soft reset command sent to Board.$$$ed?
% in�heck:
% * is a card is inserted?
% Could not find FAT16/FAT32 partition. Make sure you've formatted the card
$$$
--> --list

--> --list




--> --> --> --> 
--> --list

--> --add print
% Failure: Board RFduino buffer overflowed. Soft reset command sent to Board.$$$OpenBCI V3 8-16 channel
% On Board ADS1299 Device ID: 0x3E
% LIS3DH Device ID: 0x33
% Firmware: v3.0.0
% $$$initialization failed. Things to check:
% * is a card is inserted?
% Could not find FAT16/FAT32 partition. Make sure you've formatted the card
$$$updating channel settings to default$$$updating channel settings to default$$$Success: Configured internal test signal.$$$
--> --add print
% Success: Configured internal test signal.$$$Success: Configured internal test signal.$$$initialization failed. Things to check:
% * is a card is inserted?
% Could not find FAT16/FAT32 partition. Make sure you've formatted the card
$$$updating channel settings to default$$$updating channel settings to default$$$Success: Configured internal test signal.$$$
--> /exit
Closing Serial...
Deactivating Plugins...
User.py exiting...

***Repl Closed***

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Edgar, hi.

    Have you tried running your tests with the normal Windows command shell / prompt, which is called CMD.EXE? I'm not sure if your "Sublime Text" editor might be confusing the input/output from OpenBCI_Python. 

  • wjcroftwjcroft Mount Shasta, CA
    For example have you tried collected the CSV data output from Cyton, into a file?

    $python user.py -p /dev/ttyUSB0 —add csv_collect record.csv

    The way to capture data output is not by using the 'print' to capture data into your Sublime editor buffer. That cannot be terminated easily:

    $python user.py -p /dev/ttyUSB0 —add print   [print terminates when you type Windows 'control-c' or ^C ]

    But instead use the first command above to capture directly into a file 'record.csv'.

  • wjcroftwjcroft Mount Shasta, CA
    In the typescript you left above, you are confusing command line arguments with commands given inside the program. Please see the tutorial link.
  • William Hi!

    I tried to run it with the Windows Command Shell and it works! Thanks a lot! All the commands works perfectly and I am now recording the EMG signals without any problems.

    Regards,

    Edgar
Sign In or Register to comment.