Hello to all,
I'm working on a physics project that plans to study the precession and nodule motion of a gyroscope. I intend to do this with two mpu6050 sensors that are connected respectively to two ESP8266 modules. From the Ide di arduino I set a pair as a client and the other as a server (access point). With Python I would like to read data from both client and server at the same time. Unfortunately, I can now read only the data from the client.
Could someone help me to understand how to implement a code that is good for both the client and the server?
Do u think it could possible to add the part relative to the server?
"
import numpy # Import numpy
import matplotlib.pyplot as plt #import matplotlib library
import socket
import time
import matplotlib.pyplot as plt
from sensor_stream import SensorStream
from data_parser import DataParser
Giancarlo_Physics:
This is the Python code works as client.
That is confusing because in your Original Post you say your Python program can only communicate with the ESP8266 that acts as a client. That suggests to me that the Python program is acting as a server.
More generally I have no idea how to answer your question in Reply #2 because I have no idea what the Python program needs to communicate with. We need to see both sides of the problem.
I suggest you create the simplest possible system that just transmits "hello world" when requested and get that working before adding in your project code.