I'm using the following code to communicate my pc with an arduino, but I get the error mentioned in the title, module objet has no attribute Serial.
#!/usr/bin/python
# Importamos la libreira de PySerial
import serial
# Abrimos el puerto del arduino a 9600
PuertoSerie = serial.Serial('/dev/ttyACM0', 9600)
# Creamos un buble sin fin
while True:
# leemos hasta que encontarmos el final de linea
sArduino = PuertoSerie.readline()
# Mostramos el valor leido y eliminamos el salto de linea del final
print "Valor Arduino: " + sArduino.rstrip('\n')
The curios thing is the the code used to work, but then I installed matplotlib and drawnow libraries, I believe that has caused the problem but I don't know how to fix it, because and need those libraries any way.
The other matter is that is I copy the code line to line into the terminal it works but of course I need I with the loop in a .py file.