ModuleNotFoundError: No module named 'machine'

William Santos 0 Reputation points
2025-04-12T17:07:44.73+00:00

PS C:\Users\willa\OneDrive\Documentos\Raspberry Pi Pico\Teste4> & C:/Users/willa/AppData/Local/Programs/Python/Python313/python.exe "c:/Users/willa/OneDrive/Documentos/Raspberry Pi Pico/Teste4/teste7"

Traceback (most recent call last):

File "c:\Users\willa\OneDrive\Documentos\Raspberry Pi Pico\Teste4\teste7", line 1, in <module>

from machine import Pin

ModuleNotFoundError: No module named 'machine'

PS C:\Users\willa\OneDrive\Documentos\Raspberry Pi Pico\Teste4>

from machine import Pin
from utime import sleep

pin = Pin("LED", Pin.OUT)

print("LED starts flashing...")
while True:
    pin.toggle()
    sleep(1) # sleep 1s
Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
275 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.