Apr-26-2020, 04:53 AM
import serial import time ser = serial.Serial("/dev/ttyS0", baudrate=115200) W_buf = ["AT\r\n", "AT+CMGS=\"15555555555\"\r\n", "Helloworld"] ser.write(W_buf[0]) ser.flushInput()
Error:Traceback (most recent call last):
File "send_message.py", line 3, in <module>
ser = serial.Serial("/dev/ttyS0", baudrate=115200)
AttributeError: 'module' object has no attribute 'Serial'
#pythonnoobI just copied and pasted the code and I don't really get this error message. The pyserial package was installed using PIP. What am I doing wrong?