I have been trying to use python 2.7 to listen to the ESP8266 Thing. I am using the Arduino programming environment to program the ESP8266. The Arduino IDE debugging terminal receives and displays the information from the Thing fine. When I try to use python to listen to the serial port the Thing stops sending serial data (judging from the LED on the SparkFun Serial Basic Breakout - CH340G).
I tried the same python and Arduino code on an Arduino Uno and it works fine.
What am I doing wrong? I think python may be sending some sort of reset to the ESP and that might be the problem but I really do not know where to go from here.
ESP8266 Code:
int count = 0;
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println(count, DEC);
count++;
delay(1000);
}
Python Code:
import serial
ser = serial.Serial(port='/dev/ttyACM1', baudrate=115200)
while True:
print ser.readline()
Python 2.7.12
pySerial
Ubuntu Linux “16.04.6 LTS (Xenial Xerus)”
Thank you.