Simulink TCP/IP communication with Raspberry PI
问题 I am trying to send data from my Simulink simulation to the Raspberry Pi on the same network and write the data on CSV format. I am using the following python code to read data and write it to CSV file. import csv import socket TCP_IP = '192.168.1.8' TCP_PORT = 47899 BUFFER_SIZE = 20 s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.bind((TCP_IP, TCP_PORT)) s.listen(4) data_rcv='' conn, addr = s.accept() with open('mycsv.csv','w') as csvfile: # csvfile.write(u'\ufeff'.encode('utf8'))