Import error - using Micropython onilne
Posted: Wed May 01, 2019 9:44 am
Hi,
I'm trying out a simple code to turn ON an external LED on https://micropython.org/unicorn/. But I get an import error while importing 'Pin' attribute. Can someone guide me here? Please look at the code below:
>>> from pyb import Pin
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name Pin
>>> import pyb
>>> from pyb import Pin
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name Pin
>>>
I'm trying out a simple code to turn ON an external LED on https://micropython.org/unicorn/. But I get an import error while importing 'Pin' attribute. Can someone guide me here? Please look at the code below:
>>> from pyb import Pin
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name Pin
>>> import pyb
>>> from pyb import Pin
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name Pin
>>>