Micropython

From wiki.emacinc.com
Revision as of 10:30, 21 June 2021 by Btisler (talk | contribs) (Added Windows Install option to instructions for Thonny)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Micropython is an implementation of the Python 3 programming langauge optimized to run on microcontrollers in a constrained environment.

Micropython requires only 256k of code space and 16k RAM and aims to be as compatible as possible with normal Python 3 to allow for easy portability from desktop to microcontroller.

For full documentation on Micropython, visit: Micropython Documentation

General Information

Tools Required

  • Desktop PC
  • USB to mini-USB cable
  • Serial to USB converter (optional, may be required if board does not have USB)
  • STLink programmer (optional, may be required if board does not have USB)

Setup

EMAC Micropython

EMAC has developed multiple drivers and features for our products running Micropython.

Documentation on specific features is listed below:

Development Environment

EMAC has developed a plugin for the Thonny IDE to make writing code for the CutiPy and MitiPy easier. Thonny can be used for editing files directly on the CutiPy/MitiPy boards as well as adding new files.

Installation

  1. Install Thonny with apt for Linux:
    sudo apt install thonny
    or for Windows: Download Link
  2. Install the thonny-emac plugin from within Thonny.
    1. Open Thonny
    2. Click Tools->Manage Plugins...
    3. Type "thonny-emac" into the search bar, then click search
    4. Click the "thonny-emac" link
    5. Click the "Install" button
    6. Restart Thonny to complete installation
  3. Configure Thonny for EMAC boards
    1. Go to Tools->Options...
    2. Click the "Interpreter" tab
    3. Select "Micropython (EMAC CutiPy/MitiPy)" from the top dropdown menu

Developing on Thonny should now be configured for EMAC boards. General Thonny documentation can be found on the Thonny wiki.

Pages with Related Content