IDE Setup#
MicroPython Installation on DualMCU#
This repository contains a basic example of how to install MicroPython on the DualMCU using the ESP32 microcontroller. The main goal is for you to find this repository useful and be able to incorporate parts of this implementation into your projects.
Environment Setup#
Before you start, it is recommended to perform the following setup:
Install MicroPython#
This will allow you to download the firmware to the DualMCU using the Thonny IDE.
Go to “Run” -> “Configure interpreter” to complete the setup.
Firmware Update#
ESP32#
To use MicroPython, it is recommended to consider an update. Follow these steps to update your DualMCU ESP32:
Start your DualMCU ESP32 by pressing the FLASH button.
Click on “Install or Update MicroPython”.
A new window will open. Use the following configuration:
Variant: Espessif ESP32/WROOM
Version: 1.20.0
Press Install and wait for the installation to finish.
These steps will allow you to update and properly configure MicroPython on your DualMCU ESP32.
RP2040#
To use MicroPython, it is recommended to consider an update. Follow these steps to update your DualMCU RP2040:
Start your DualMCU RP2040 by pressing the FLASH button.
Click on “Install or Update MicroPython”.
A new window will open. Use the following configuration:
Variant: Raspberry Pi Pico / Pico H
Version: 1.23.0
Press Install and wait for the installation to finish.
These steps will allow you to update and properly configure MicroPython on your DualMCU ESP32.
Running the Example#
Once you have set up the environment, you can open and run the example, open Thonny, and follow these steps:
Go to the bottom right corner and select the “MicroPython (ESP32)” option.
Blink Example#
Inside the Examples folder, you will find a basic example called “blink” that you can use to verify that the setup was applied correctly.
'''
Unit Electronics 2023
(o_
(o_ //\
(/)_ V_/_
version: 0.0.1
revision: 0.0.1
context: This code is a basic configuration of three RGB LEDs
'''
import machine
import time
led_pin = machine.Pin(4, machine.Pin.OUT)
led_pin2 = machine.Pin(26, machine.Pin.OUT)
led_pin3 = machine.Pin(25, machine.Pin.OUT)
def loop():
while True:
led_pin.on()
led_pin2.on()
led_pin3.on()
time.sleep(1)
led_pin.off()
led_pin2.off()
led_pin3.off()
time.sleep(1)
loop()
Arduino IDE Installation environment#
Uelectronics-RP2040-Arduino-Package#
Uelectronics Arduino core is a ported version of the Raspberry Pi Pico Arduino Core based on the great work of earlephilhower Earle F. Philhower, III. This port of the RP2040 uses the Raspberry Pi Pico SDK and a custom GCC 10.3/Newlib 4.0 toolchain, the same as earlephilhower version 2.6.4.
Documentation#
See UNIT-Electronics/DualMCU along with the examples for more detailed usage information.
Supported Boards#
DualMCU RP2040
Raspberry Pi Pico
Raspberry Pi Pico W
Generic (configurable flash, I/O pins)
Installing via Arduino Boards Manager#
Open up the Arduino IDE and go to File->Preferences.
In the dialog that pops up, enter the following URL in the “Additional Boards Manager URLs” field:
Hit OK to close the dialog.
Go to Tools->Boards->Board Manager in the IDE
Type “DualMCU” in the search box and select “Add”:
Uelectronics-ESP32-Arduino-Package#
The Uelectronics-ESP32-Arduino package is a collection of software tools that enable users to program and control devices using the ESP32 MCU on the DualMCU and the Arduino platform. The package includes a set of libraries and tools for programming the ESP32 using the Arduino (IDE).
The package includes a range of sample code and examples to help users get started with programming the ESP32 and creating connected devices.
Supported Boards#
UNIT DualMCU ONE
UNIT DualMCU ESP32
ESP32 Dev Module
ESP32S3 Dev Module
ESP32C3 Dev Module
ESP32S2 Dev Module
Installing via Arduino Boards Manager#
Open up the Arduino IDE and go to File->Preferences.
Stable release link:
Arduino allows installation of third-party platform packages using Boards Manager.
Install the current upstream Arduino IDE at the 1.8 level or later. The current version is at the Arduino website.
Start Arduino and open Preferences window.
Enter one of the release links above into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.
Open Boards Manager from Tools > Board menu and install esp32 platform (and don’t forget to select your ESP32 board from Tools > Board menu after installation).
Support#
The DualMCU development board is compatible with both the MicroPython Integrated Development Environment (IDE), such as Thonny, and the Arduino development environment. This compatibility allows you to program the DualMCU using MicroPython, CircuitPython, or the Arduino programming language.
MicroPython IDE support includes an interactive console (REPL) for executing commands immediately in MicroPython and CircuitPython, enabling quick and easy code testing and debugging.
Furthermore, support for the Arduino development environment allows you to leverage the extensive tools and community resources available through Arduino. This can be particularly beneficial if you are already familiar with Arduino and wish to utilize its user-friendly features and abundant resources for developing projects with the DualMCU development board.
Arduino Package RP2040 |
https://github.com/UNIT-Electronics/Uelectronics-RP2040-Arduino-Package |
Arduino Package ESP32 |
https://github.com/UNIT-Electronics/Uelectronics-ESP32-Arduino-Package |