has anyone manage to receive some data with python-osc module?
I'm using this simple server example but it doesn't work. Any help or thoughts would be really appreciated
Code: Select all
import argparse
from pythonosc import dispatcher
from pythonosc import osc_server
def eeg_handler(unused_addr,args,ch1,ch2,ch3,ch4):
print("EEG per channel: ",ch1,ch2,ch3,ch4)
if __name__ == '__main__':
Port = 5000
parser = argparse.ArgumentParser()
parser.add_argument("--ip",default = "192.168.123.100")
parser.add_argument("--port",default = Port)
args = parser.parse_args()
dispatcher = dispatcher.Dispatcher()
dispatcher.map("/debug",print)
dispatcher.map("/Muse/eeg",eeg_handler,"EEG")
server = osc_server.ThreadingOSCUDPServer((args.ip,args.port), dispatcher)
server.serve_forever()