diff -r 9a2aa5353a32 -r eb85ced7844c eric6/MicroPython/MicroPythonDevices.py --- a/eric6/MicroPython/MicroPythonDevices.py Sat Feb 20 14:25:06 2021 +0100 +++ b/eric6/MicroPython/MicroPythonDevices.py Sat Feb 20 14:28:14 2021 +0100 @@ -137,7 +137,16 @@ "port_description": "", }, - # TODO: add RP2040 boards (VID: 0x2e8a, PID: 0x0005) + "rp2040": { + "ids": [ + (0x2E8A, 0x0005), # Raspberry Pi Pico + ], + "description": QCoreApplication.translate( + "MicroPythonDevice", "RP2040 based"), + "icon": "rp2040Device", + "port_description": "", + }, + "generic": { # only manually configured devices use this "ids": [], @@ -290,7 +299,9 @@ elif deviceType == "pyboard": from .PyBoardDevices import PyBoardDevice return PyBoardDevice(microPythonWidget, deviceType) - # TODO: add RP2040 boards (VID: 0x2e8a, PID: 0x0005) + elif deviceType == "rp2040": + from .RP2040Devices import RP2040Device + return RP2040Device(microPythonWidget, deviceType) elif deviceType == "generic": from .GenericMicroPythonDevices import GenericMicroPythonDevice return GenericMicroPythonDevice(microPythonWidget, deviceType, @@ -494,7 +505,7 @@ commands = [c.encode("utf-8)") + b'\r' for c in commandsList] commands.append(b'\r') commands.append(b'\x04') - rawOff = [b'\x02'] + rawOff = [b'\x02', b'\x02'] commandSequence = rawOn + newLine + commands + rawOff self.microPython.commandsInterface().executeAsync(commandSequence)