From 1e012ba3732f764dcc695de78a739667a49b18c2 Mon Sep 17 00:00:00 2001 From: AJ Keller Date: Sun, 14 Jan 2018 07:21:17 -0500 Subject: [PATCH] REFACTOR: Move plugins to openbci dir --- CHANGELOG.md | 1 + openbci/__init__.py | 3 +- {plugins => openbci/plugins}/README.md | 0 openbci/plugins/__init__.py | 9 + {plugins => openbci/plugins}/csv_collect.py | 0 .../plugins}/csv_collect.yapsy-plugin | 0 {plugins => openbci/plugins}/noise_test.py | 0 .../plugins}/noise_test.yapsy-plugin | 0 {plugins => openbci/plugins}/print.py | 0 .../plugins}/print.yapsy-plugin | 0 {plugins => openbci/plugins}/sample_rate.py | 0 .../plugins}/sample_rate.yapsy-plugin | 0 {plugins => openbci/plugins}/streamer_lsl.py | 0 .../plugins}/streamer_lsl.yapsy-plugin | 0 {plugins => openbci/plugins}/streamer_osc.py | 0 .../plugins}/streamer_osc.yapsy-plugin | 0 .../plugins}/streamer_tcp.yapsy-plugin | 0 openbci/plugins/streamer_tcp_server.py | 132 ++++++++++++++ {plugins => openbci/plugins}/udp_server.py | 0 .../plugins}/udp_server.yapsy-plugin | 0 plugins/streamer_tcp_server.py | 132 -------------- scripts/stream_data.py | 172 +++++++++--------- scripts/stream_data_wifi_high_speed.py | 4 +- scripts/test.py | 35 ++-- setup.py | 4 +- 25 files changed, 253 insertions(+), 239 deletions(-) rename {plugins => openbci/plugins}/README.md (100%) create mode 100644 openbci/plugins/__init__.py rename {plugins => openbci/plugins}/csv_collect.py (100%) rename {plugins => openbci/plugins}/csv_collect.yapsy-plugin (100%) rename {plugins => openbci/plugins}/noise_test.py (100%) rename {plugins => openbci/plugins}/noise_test.yapsy-plugin (100%) rename {plugins => openbci/plugins}/print.py (100%) rename {plugins => openbci/plugins}/print.yapsy-plugin (100%) rename {plugins => openbci/plugins}/sample_rate.py (100%) rename {plugins => openbci/plugins}/sample_rate.yapsy-plugin (100%) rename {plugins => openbci/plugins}/streamer_lsl.py (100%) rename {plugins => openbci/plugins}/streamer_lsl.yapsy-plugin (100%) rename {plugins => openbci/plugins}/streamer_osc.py (100%) rename {plugins => openbci/plugins}/streamer_osc.yapsy-plugin (100%) rename {plugins => openbci/plugins}/streamer_tcp.yapsy-plugin (100%) create mode 100755 openbci/plugins/streamer_tcp_server.py rename {plugins => openbci/plugins}/udp_server.py (100%) rename {plugins => openbci/plugins}/udp_server.yapsy-plugin (100%) delete mode 100755 plugins/streamer_tcp_server.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 62fc514..c6a5842 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Breaking Changes * Refactored library for pip +* Moved plugins folder into openbci dir so plugins can be imported when installed with pip # v0.1 diff --git a/openbci/__init__.py b/openbci/__init__.py index c2d3bfe..3717f85 100644 --- a/openbci/__init__.py +++ b/openbci/__init__.py @@ -1,8 +1,9 @@ from .cyton import OpenBCICyton from .ganglion import OpenBCIGanglion -from .wifi import OpenBCIWiFi +from .plugins import * from .utils import * +from .wifi import OpenBCIWiFi __version__ = "1.0.0" diff --git a/plugins/README.md b/openbci/plugins/README.md similarity index 100% rename from plugins/README.md rename to openbci/plugins/README.md diff --git a/openbci/plugins/__init__.py b/openbci/plugins/__init__.py new file mode 100644 index 0000000..60e9339 --- /dev/null +++ b/openbci/plugins/__init__.py @@ -0,0 +1,9 @@ + +from .csv_collect import * +from .noise_test import * +from .streamer_lsl import * +from .streamer_osc import * +from .streamer_tcp_server import * +from .udp_server import * + +__version__ = "1.0.0" diff --git a/plugins/csv_collect.py b/openbci/plugins/csv_collect.py similarity index 100% rename from plugins/csv_collect.py rename to openbci/plugins/csv_collect.py diff --git a/plugins/csv_collect.yapsy-plugin b/openbci/plugins/csv_collect.yapsy-plugin similarity index 100% rename from plugins/csv_collect.yapsy-plugin rename to openbci/plugins/csv_collect.yapsy-plugin diff --git a/plugins/noise_test.py b/openbci/plugins/noise_test.py similarity index 100% rename from plugins/noise_test.py rename to openbci/plugins/noise_test.py diff --git a/plugins/noise_test.yapsy-plugin b/openbci/plugins/noise_test.yapsy-plugin similarity index 100% rename from plugins/noise_test.yapsy-plugin rename to openbci/plugins/noise_test.yapsy-plugin diff --git a/plugins/print.py b/openbci/plugins/print.py similarity index 100% rename from plugins/print.py rename to openbci/plugins/print.py diff --git a/plugins/print.yapsy-plugin b/openbci/plugins/print.yapsy-plugin similarity index 100% rename from plugins/print.yapsy-plugin rename to openbci/plugins/print.yapsy-plugin diff --git a/plugins/sample_rate.py b/openbci/plugins/sample_rate.py similarity index 100% rename from plugins/sample_rate.py rename to openbci/plugins/sample_rate.py diff --git a/plugins/sample_rate.yapsy-plugin b/openbci/plugins/sample_rate.yapsy-plugin similarity index 100% rename from plugins/sample_rate.yapsy-plugin rename to openbci/plugins/sample_rate.yapsy-plugin diff --git a/plugins/streamer_lsl.py b/openbci/plugins/streamer_lsl.py similarity index 100% rename from plugins/streamer_lsl.py rename to openbci/plugins/streamer_lsl.py diff --git a/plugins/streamer_lsl.yapsy-plugin b/openbci/plugins/streamer_lsl.yapsy-plugin similarity index 100% rename from plugins/streamer_lsl.yapsy-plugin rename to openbci/plugins/streamer_lsl.yapsy-plugin diff --git a/plugins/streamer_osc.py b/openbci/plugins/streamer_osc.py similarity index 100% rename from plugins/streamer_osc.py rename to openbci/plugins/streamer_osc.py diff --git a/plugins/streamer_osc.yapsy-plugin b/openbci/plugins/streamer_osc.yapsy-plugin similarity index 100% rename from plugins/streamer_osc.yapsy-plugin rename to openbci/plugins/streamer_osc.yapsy-plugin diff --git a/plugins/streamer_tcp.yapsy-plugin b/openbci/plugins/streamer_tcp.yapsy-plugin similarity index 100% rename from plugins/streamer_tcp.yapsy-plugin rename to openbci/plugins/streamer_tcp.yapsy-plugin diff --git a/openbci/plugins/streamer_tcp_server.py b/openbci/plugins/streamer_tcp_server.py new file mode 100755 index 0000000..0945f97 --- /dev/null +++ b/openbci/plugins/streamer_tcp_server.py @@ -0,0 +1,132 @@ +from threading import Thread +import socket, select, struct, time +import plugin_interface as plugintypes + +# Simple TCP server to "broadcast" data to clients, handling deconnections. Binary format use network endianness (i.e., big-endian), float32 + +# TODO: does not listen for anything at the moment, could use it to set options + +# Handling new client in separate thread +class MonitorStreamer(Thread): + """Launch and monitor a "Streamer" entity (incoming connections if implemented, current sampling rate).""" + # tcp_server: the TCPServer instance that will be used + def __init__(self, streamer): + Thread.__init__(self) + # bind to Streamer entity + self.server = streamer + + def run(self): + # run until we DIE + while True: + # check FPS + listen for new connections + # FIXME: not so great with threads -- use a lock? + # TODO: configure interval + self.server.check_connections() + time.sleep(1) + + +class StreamerTCPServer(plugintypes.IPluginExtended): + """ + + Relay OpenBCI values to TCP clients + + Args: + port: Port of the server + ip: IP address of the server + + """ + + def __init__(self, ip='localhost', port=12345): + # list of socket clients + self.CONNECTION_LIST = [] + # connection infos + self.ip = ip + self.port = port + + # From IPlugin + def activate(self): + if len(self.args) > 0: + self.ip = self.args[0] + if len(self.args) > 1: + self.port = int(self.args[1]) + + # init network + print("Selecting raw TCP streaming. IP: " + self.ip + ", port: " + str(self.port)) + self.initialize() + + # init the daemon that monitors connections + self.monit = MonitorStreamer(self) + self.monit.daemon = True + # launch monitor + self.monit.start() + + # the initialize method reads settings and outputs the first header + def initialize(self): + # init server + self.server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + # this has no effect, why ? + self.server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + # create connection + self.server_socket.bind((self.ip, self.port)) + self.server_socket.listen(1) + print("Server started on port " + str(self.port)) + + # From Streamer, to be called each time we're willing to accept new connections + def check_connections(self): + # First listen for new connections, and new connections only -- this is why we pass only server_socket + read_sockets,write_sockets,error_sockets = select.select([self.server_socket],[],[], 0) + for sock in read_sockets: + # New connection + sockfd, addr = self.server_socket.accept() + self.CONNECTION_LIST.append(sockfd) + print("Client (%s, %s) connected" % addr) + # and... don't bother with incoming messages + + # From IPlugin: close sockets, send message to client + def deactivate(self): + # close all remote connections + for sock in self.CONNECTION_LIST: + if sock != self.server_socket: + try: + sock.send("closing!\n") + # at this point don't bother if message not sent + except: + continue + sock.close(); + # close server socket + self.server_socket.close(); + + # broadcast channels values to all clients + # as_string: many for debug, send values with a nice "[34.45, 30.4, -38.0]"-like format + def __call__(self, sample, as_string=False): + values=sample.channel_data + # save sockets that are closed to remove them later on + outdated_list = [] + for sock in self.CONNECTION_LIST: + # If one error should happen, we remove socket from the list + try: + if as_string: + sock.send(str(values) + "\n") + else: + nb_channels=len(values) + # format for binary data, network endian (big) and float (float32) + packer = struct.Struct('!%sf' % nb_channels) + # convert values to bytes + packed_data = packer.pack(*values) + sock.send(packed_data) + # TODO: should check if the correct number of bytes passed through + except: + # sometimes (always?) it's only during the second write to a close socket that an error is raised? + print("Something bad happened, will close socket") + outdated_list.append(sock) + # now we are outside of the main list, it's time to remove outdated sockets, if any + for bad_sock in outdated_list: + print("Removing socket...") + self.CONNECTION_LIST.remove(bad_sock) + # not very costly to be polite + bad_sock.close() + + def show_help(self): + print("""Optional arguments: [ip [port]] + \t ip: target IP address (default: 'localhost') + \t port: target port (default: 12345)""") diff --git a/plugins/udp_server.py b/openbci/plugins/udp_server.py similarity index 100% rename from plugins/udp_server.py rename to openbci/plugins/udp_server.py diff --git a/plugins/udp_server.yapsy-plugin b/openbci/plugins/udp_server.yapsy-plugin similarity index 100% rename from plugins/udp_server.yapsy-plugin rename to openbci/plugins/udp_server.yapsy-plugin diff --git a/plugins/streamer_tcp_server.py b/plugins/streamer_tcp_server.py deleted file mode 100755 index 1571163..0000000 --- a/plugins/streamer_tcp_server.py +++ /dev/null @@ -1,132 +0,0 @@ -from threading import Thread -import socket, select, struct, time -import plugin_interface as plugintypes - -# Simple TCP server to "broadcast" data to clients, handling deconnections. Binary format use network endianness (i.e., big-endian), float32 - -# TODO: does not listen for anything at the moment, could use it to set options - -# Handling new client in separate thread -class MonitorStreamer(Thread): - """Launch and monitor a "Streamer" entity (incoming connections if implemented, current sampling rate).""" - # tcp_server: the TCPServer instance that will be used - def __init__(self, streamer): - Thread.__init__(self) - # bind to Streamer entity - self.server = streamer - - def run(self): - # run until we DIE - while True: - # check FPS + listen for new connections - # FIXME: not so great with threads -- use a lock? - # TODO: configure interval - self.server.check_connections() - time.sleep(1) - - -class StreamerTCPServer(plugintypes.IPluginExtended): - """ - - Relay OpenBCI values to TCP clients - - Args: - port: Port of the server - ip: IP address of the server - - """ - - def __init__(self, ip='localhost', port=12345): - # list of socket clients - self.CONNECTION_LIST = [] - # connection infos - self.ip = ip - self.port = port - - # From IPlugin - def activate(self): - if len(self.args) > 0: - self.ip = self.args[0] - if len(self.args) > 1: - self.port = int(self.args[1]) - - # init network - print("Selecting raw TCP streaming. IP: " + self.ip + ", port: " + str(self.port)) - self.initialize() - - # init the daemon that monitors connections - self.monit = MonitorStreamer(self) - self.monit.daemon = True - # launch monitor - self.monit.start() - - # the initialize method reads settings and outputs the first header - def initialize(self): - # init server - self.server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - # this has no effect, why ? - self.server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - # create connection - self.server_socket.bind((self.ip, self.port)) - self.server_socket.listen(1) - print("Server started on port " + str(self.port)) - - # From Streamer, to be called each time we're willing to accept new connections - def check_connections(self): - # First listen for new connections, and new connections only -- this is why we pass only server_socket - read_sockets,write_sockets,error_sockets = select.select([self.server_socket],[],[], 0) - for sock in read_sockets: - # New connection - sockfd, addr = self.server_socket.accept() - self.CONNECTION_LIST.append(sockfd) - print("Client (%s, %s) connected" % addr) - # and... don't bother with incoming messages - - # From IPlugin: close sockets, send message to client - def deactivate(self): - # close all remote connections - for sock in self.CONNECTION_LIST: - if sock != self.server_socket: - try: - sock.send("closing!\n") - # at this point don't bother if message not sent - except: - continue - sock.close(); - # close server socket - self.server_socket.close(); - - # broadcast channels values to all clients - # as_string: many for debug, send values with a nice "[34.45, 30.4, -38.0]"-like format - def __call__(self, sample, as_string=False): - values=sample.channel_data - # save sockets that are closed to remove them later on - outdated_list = [] - for sock in self.CONNECTION_LIST: - # If one error should happen, we remove socket from the list - try: - if as_string: - sock.send(str(values) + "\n") - else: - nb_channels=len(values) - # format for binary data, network endian (big) and float (float32) - packer = struct.Struct('!%sf' % nb_channels) - # convert values to bytes - packed_data = packer.pack(*values) - sock.send(packed_data) - # TODO: should check if the correct number of bytes passed through - except: - # sometimes (always?) it's only during the second write to a close socket that an error is raised? - print("Something bad happened, will close socket") - outdated_list.append(sock) - # now we are outside of the main list, it's time to remove outdated sockets, if any - for bad_sock in outdated_list: - print("Removing socket...") - self.CONNECTION_LIST.remove(bad_sock) - # not very costly to be polite - bad_sock.close() - - def show_help(self): - print("""Optional arguments: [ip [port]] - \t ip: target IP address (default: 'localhost') - \t port: target port (default: 12345)""") diff --git a/scripts/stream_data.py b/scripts/stream_data.py index 4e8c6ab..f900c12 100644 --- a/scripts/stream_data.py +++ b/scripts/stream_data.py @@ -1,6 +1,6 @@ import sys; sys.path.append('..') # help python find cyton.py relative to scripts folder from openbci import cyton as bci -import streamer_tcp_server +from openbci.plugins import StreamerTCPServer import time, timeit from threading import Thread @@ -47,93 +47,93 @@ def __init__(self): self.start_tick = self.tick def run(self): - while True: - # check FPS + listen for new connections - new_tick = timeit.default_timer() - elapsed_time = new_tick - self.tick - current_samples_in = nb_samples_in - current_samples_out = nb_samples_out - print "--- at t: ", (new_tick - self.start_tick), " ---" - print "elapsed_time: ", elapsed_time - print "nb_samples_in: ", current_samples_in - self.nb_samples_in - print "nb_samples_out: ", current_samples_out - self.nb_samples_out - self.tick = new_tick - self.nb_samples_in = nb_samples_in - self.nb_samples_out = nb_samples_out - # time to watch for connection - # FIXME: not so great with threads - server.check_connections() - time.sleep(1) + while True: + # check FPS + listen for new connections + new_tick = timeit.default_timer() + elapsed_time = new_tick - self.tick + current_samples_in = nb_samples_in + current_samples_out = nb_samples_out + print "--- at t: ", (new_tick - self.start_tick), " ---" + print "elapsed_time: ", elapsed_time + print "nb_samples_in: ", current_samples_in - self.nb_samples_in + print "nb_samples_out: ", current_samples_out - self.nb_samples_out + self.tick = new_tick + self.nb_samples_in = nb_samples_in + self.nb_samples_out = nb_samples_out + # time to watch for connection + # FIXME: not so great with threads + server.check_connections() + time.sleep(1) def streamData(sample): - - global last_values - - global tick - - # check packet skipped - global last_id - # TODO: duplicate packet if skipped to stay sync - if sample.id != last_id + 1: - print "time", tick, ": paquet skipped!" - if sample.id == 255: - last_id = -1 - else: - last_id = sample.id - - # update counters - global nb_samples_in, nb_samples_out - nb_samples_in = nb_samples_in + 1 - - # check for duplication, by default 1 (...which is *no* duplication of the one current sample) - global leftover_duplications - - # first method with sampling rate and elapsed time (depends on system clock accuracy) - if (SAMPLING_RATE > 0): - # elapsed time since last call, update tick - now = timeit.default_timer() - elapsed_time = now - tick; - # now we have to compute how many times we should send data to keep up with sample rate (oversampling) - leftover_duplications = SAMPLING_RATE * elapsed_time + leftover_duplications - 1 - tick = now - # second method with a samplin factor (depends on openbci accuracy) - elif SAMPLING_FACTOR > 0: - leftover_duplications = SAMPLING_FACTOR + leftover_duplications - 1 - #print "needed_duplications: ", needed_duplications, "leftover_duplications: ", leftover_duplications - # If we need to insert values, will interpolate between current packet and last one - # FIXME: ok, at the moment because we do packet per packet treatment, only handles nb_duplications == 1 for more interpolation is bad and sends nothing - if (leftover_duplications > 1): - leftover_duplications = leftover_duplications - 1 - interpol_values = list(last_values) - for i in range(0,len(interpol_values)): - # OK, it's a very rough interpolation - interpol_values[i] = (last_values[i] + sample.channel_data[i]) / 2 - if DEBUG: - print " --" - print " last values: ", last_values - print " interpolation: ", interpol_values - print " current sample: ", sample.channel_data - # send to clients interpolated sample - #leftover_duplications = 0 - server.broadcast_values(interpol_values) + + global last_values + + global tick + + # check packet skipped + global last_id + # TODO: duplicate packet if skipped to stay sync + if sample.id != last_id + 1: + print "time", tick, ": paquet skipped!" + if sample.id == 255: + last_id = -1 + else: + last_id = sample.id + + # update counters + global nb_samples_in, nb_samples_out + nb_samples_in = nb_samples_in + 1 + + # check for duplication, by default 1 (...which is *no* duplication of the one current sample) + global leftover_duplications + + # first method with sampling rate and elapsed time (depends on system clock accuracy) + if (SAMPLING_RATE > 0): + # elapsed time since last call, update tick + now = timeit.default_timer() + elapsed_time = now - tick; + # now we have to compute how many times we should send data to keep up with sample rate (oversampling) + leftover_duplications = SAMPLING_RATE * elapsed_time + leftover_duplications - 1 + tick = now + # second method with a samplin factor (depends on openbci accuracy) + elif SAMPLING_FACTOR > 0: + leftover_duplications = SAMPLING_FACTOR + leftover_duplications - 1 + #print "needed_duplications: ", needed_duplications, "leftover_duplications: ", leftover_duplications + # If we need to insert values, will interpolate between current packet and last one + # FIXME: ok, at the moment because we do packet per packet treatment, only handles nb_duplications == 1 for more interpolation is bad and sends nothing + if (leftover_duplications > 1): + leftover_duplications = leftover_duplications - 1 + interpol_values = list(last_values) + for i in range(0,len(interpol_values)): + # OK, it's a very rough interpolation + interpol_values[i] = (last_values[i] + sample.channel_data[i]) / 2 + if DEBUG: + print " --" + print " last values: ", last_values + print " interpolation: ", interpol_values + print " current sample: ", sample.channel_data + # send to clients interpolated sample + # leftover_duplications = 0 + server.broadcast_values(interpol_values) + nb_samples_out = nb_samples_out + 1 + + # send to clients current sample + server.broadcast_values(sample.channel_data) nb_samples_out = nb_samples_out + 1 - - # send to clients current sample - server.broadcast_values(sample.channel_data) - nb_samples_out = nb_samples_out + 1 - - # save current values for possible interpolation - last_values = list(sample.channel_data) + + # save current values for possible interpolation + last_values = list(sample.channel_data) if __name__ == '__main__': - # init server - server = streamer_tcp_server.StreamerTCPServer(ip=SERVER_IP, port=SERVER_PORT, nb_channels=NB_CHANNELS) - # init board - port = '/dev/ttyUSB1' - baud = 115200 - monit = Monitor() - # daemonize theard to terminate it altogether with the main when time will come - monit.daemon = True - monit.start() - board = bci.OpenBCICyton(port=port, baud=baud, filter_data=False) - board.startStreaming(streamData) + # init server + server = StreamerTCPServer(ip=SERVER_IP, port=SERVER_PORT) + # init board + port = '/dev/tty.usbserial-DB00JAM0' + baud = 115200 + monit = Monitor() + # daemonize theard to terminate it altogether with the main when time will come + monit.daemon = True + monit.start() + board = bci.OpenBCICyton(port=port, baud=baud, filter_data=False) + board.start_streaming(streamData) diff --git a/scripts/stream_data_wifi_high_speed.py b/scripts/stream_data_wifi_high_speed.py index 0d868f0..1694738 100644 --- a/scripts/stream_data_wifi_high_speed.py +++ b/scripts/stream_data_wifi_high_speed.py @@ -8,9 +8,11 @@ def printData(sample): if __name__ == '__main__': - shield_name = 'OpenBCI-E218' logging.basicConfig(filename="test.log",format='%(asctime)s - %(levelname)s : %(message)s',level=logging.DEBUG) logging.info('---------LOG START-------------') + # If you don't know your IP Address, you can use shield name option + # If you know IP, such as with wifi direct 192.168.4.1, then use ip_address='192.168.4.1' + shield_name = 'OpenBCI-E218' shield = bci.OpenBCIWiFi(shield_name=shield_name, log=True, high_speed=True) print("WiFi Shield Instantiated") shield.start_streaming(printData) diff --git a/scripts/test.py b/scripts/test.py index b86ce2b..4f49f0b 100644 --- a/scripts/test.py +++ b/scripts/test.py @@ -4,24 +4,25 @@ import time def printData(sample): - #os.system('clear') - print "----------------" - print("%f" %(sample.id)) - print sample.channel_data - print sample.aux_data - print "----------------" + #os.system('clear') + print "----------------" + print("%f" %(sample.id)) + print sample.channel_data + print sample.aux_data + print "----------------" if __name__ == '__main__': - port = '/dev/tty.OpenBCI-DN008VTF' - #port = '/dev/tty.OpenBCI-DN0096XA' - baud = 115200 - logging.basicConfig(filename="test.log",format='%(asctime)s - %(levelname)s : %(message)s',level=logging.DEBUG) - logging.info('---------LOG START-------------') - board = bci.OpenBCICyton(port=port, scaled_output=False, log=True) - print("Board Instantiated") - board.ser.write('v') - time.sleep(10) - #board.start_streaming(printData) - board.print_bytes_in() + # port = '/dev/tty.OpenBCI-DN008VTF' + port = '/dev/tty.usbserial-DB00JAM0' + # port = '/dev/tty.OpenBCI-DN0096XA' + baud = 115200 + logging.basicConfig(filename="test.log",format='%(asctime)s - %(levelname)s : %(message)s',level=logging.DEBUG) + logging.info('---------LOG START-------------') + board = bci.OpenBCICyton(port=port, scaled_output=False, log=True) + print("Board Instantiated") + board.ser.write('v') + time.sleep(10) + board.start_streaming(printData) + board.print_bytes_in() diff --git a/setup.py b/setup.py index bc36228..c637411 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,8 @@ setup(name = 'OpenBCI_Python', version = '1.0.0', description = 'A lib for controlling OpenBCI Devices', - author='Jeremy Frey', - author_email='frederic.simard.1@outlook.com', + author='AJ Keller', + author_email='pushtheworldllc@gmail.com', license='MIT', packages=find_packages(), install_requires=['numpy'],