DualMCU
ESP32
SKU: UE0002
5.4 Micropython hello world on the RP2040
1) In Thonny editor click File->New to open new python file and start writing the code in
the editor:
from machine import Pin
import utime
led_pin = Pin(25,Pin.OUT)
led_pin.toggle()
print(“Hello World!”)
while True:
led_pin.toggle()
utime.sleep(1)
2) In the menu select: Run > Select Interpreter.... This will open a new window for the
Thonny options. In the Interpreter tab, select MicroPython (Raspberry Pi Pico) as the
interpreter and select
the COM port with which your system recognizes the
DualMCU for RP2040 (please make sure that the USB selector switch is in position
“A”, see section 3.11).
28
Unit Electronics ® DualMCU ESP32
Modified: 26/06/2023