"Import machine" not working on RPi pico

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
Odolyte
Posts: 2
Joined: Sun Jan 31, 2021 4:25 pm

"Import machine" not working on RPi pico

Post by Odolyte » Sun Jan 31, 2021 4:31 pm

Hi,

with last micropython image : "adafruit-circuitpython-raspberry_pi_pico-fr-6.2.0-beta.1.uf2"

a print ("hello world") works fine but when i try to make the onboard led blink with :

Code: Select all

import machine
import utime
led_onboard = machine.Pin(25, machine.Pin.OUT)
while True:
	led_onboard.value(1)
	utime.sleep(1)
	led_onboard.value(0)
	utime.sleep(1)
i get an error on the first line saying that the "machine module" is missing.

What did i do wrong?

Thanks for your help

Odo

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: "Import machine" not working on RPi pico

Post by jimmo » Mon Feb 01, 2021 12:02 am


Post Reply