I've a python file reads serial data from arduino which is generated in loop.
#!/usr/bin/python
import serial
ser = serial.Serial('/dev/ttyACM0', 9600)
while True:
print(ser.readline())
ser.close()
How to import these data by Javascript?
I used xmlhttprequest to open the python file in a loop but it's re-opening the python file rather than streaming the serial data.. Can I loop the xmlhttprequest response to retrieve the data?
Is there anyway to retrieve the python's data in javascript?