DEV Community

Kashif Iftikhar
Kashif Iftikhar

Posted on

ImportError: cannot import name 'Serial' from 'serial' (unknown location)

Whenever i execute the code below it gives me following Error:

ImportError: cannot import name 'Serial' from 'serial' (unknown location)

Code:

  from serial import Serial
  arduinodata = Serial('com4',9600)

  print("Enter n to ON LED and f to OFF LED")

  while 1:
    input_data = raw_input()
    print ("You Entered"+input_data)
    
    if (input_data == 'n'):

Top comments (0)