Skip to content

Install Python Interpreter

This section describes how to install and verify the Python Interpreter on your nRF52840 M.2 Developer Kit.

Prepare the firmware

The pre-built CircuitPython firmware for the nRF52840 M.2 Developer Kit is hosted on GitHub Release Site with the name nrf52840_m2_devkit_circuitpython_<version>.hex. Download the latest version into your local directory:

Install Python

Install the Python Interpreter by performing the following steps:

  1. Connect the Debugger USB port to your PC using the provided USB-C Cable. A disk drive called M2-DOCK will be automatically detected by the computer:

  2. Drag and drop the firmware nrf52840_m2_devkit_circuitpython_<version>.hex onto the M2-DOCK drive:

  3. Alternatively, you can run the following command to flash the firmware:

    pyocd flash -t nrf52840 nrf52840_m2_devkit_circuitpython_<version>.hex
    

Tip

See Programming section for more details about how to program the nRF52840 M.2 Module.

Verify the firmware

Once the Python Interpreter firmware is flashed, we can verify it by performing the following steps:

  1. Connect the Module USB port to your PC as shown in the figure below. A disk drive called CIRCUITPY should be automatically detected by the computer:

  2. Start a terminal application like PuTTY or screen:

    screen /dev/cu.usbmodem14102 115200
    
  3. In the terminal window, press any key to enter the Python REPL mode, and try some Python code:

    >>> print('Hello, world!')
    

Next steps

Now that you have the Python Interpreter installed, it's time to explore more examples for the nRF52840 M.2 Developer Kit:

Create an Issue

Interested in contributing to this project? Want to report a bug? Feel free to click here: