How-Tos

Change the selected device

When you run a Python/MicroPython application or open the console, you have to select a device to communicate with. You can change this device or discover new ones at any time from the Navigation bar.

Do not automatically run MicroPython applications at module startup

By default, the plugin configures the XBee device to automatically run the flashed MicroPython application every time it boots. This behavior can be changed in the project's run configuration (Run > Edit configurations...). Once there, uncheck the Automatically run MicroPython application at module startup option.

Show the quick documentation popup

One of the most interesting features of the plugin is that it helps you while you code with complete documentation about modules, methods, and classes. This option is disabled by default in PyCharm.

To enable it:

  1. Go to File > Settings > Editor > General > Code Completion.

  2. Check the Show the documentation popup option.

You can also enable the quick documentation on mouse move in Settings > Editor > General > Show quick documentation on mouse move.

Enable/disable Python/MicroPython sources compilation

Although we recommend compiling your source files before transferring them to the target device, you can enable or disable this feature from the project settings:

To enable/disable the compile option:

  1. Go to File > Settings.

  2. Select the Project: <project_name> option in the left menu.

  3. Select XBee MicroPython or Digi Python option in the Project settings panel.

  4. Check or uncheck Compile source files with 'mpy-cross' or Compile Python sources option.

  5. Click OK.

Change the associated platform of the project

When you create a new project or import a sample, you have to specify the target platform to launch the application. This configuration helps the Digi XBee PyCharm IDE Plugin to filter the samples and libraries and list only those compatible with the selected platform.

To change the target platform of your project once it has been created:

  1. Go to File > Settings...
  2. Select the Project: <project_name> option in the left menu.
  3. Select the XBee MicroPython or Digi Python option in the Project settings panel.
  4. Choose the new Target platform.
  5. Click OK.

Exclude files or folders from the compilation

PyCharm allows you to exclude any file or folder from the compilation so that they are not transferred to the XBee device. To do so:

  1. Go to File > Settings.
  2. Select the Project: <project_name> option in the left menu.
  3. Select the Project Structure in the Project settings panel.
  4. In the Exclude files field, type the masks that define the names of files and folders to be excluded, for example, *.pyc. Use ; to separate name patterns, * for any number of symbols, and ? for one.
    If the name of a file matches any of these patterns, the file is treated as excluded. If the name of a folder matches a pattern, all the files in this folder and in its subfolders are marked as excluded.

Configure your Digi Remote Manager account

If you want to run a MicroPython application on a remote XBee Cellular added to Digi Remote Manager or communicate with its REPL, you need to enter the credentials of your account. To do so:

  1. Go to Digi > Digi Remote Manager Accounts.

  2. Click Add DRM Account.

  3. Enter the username and password of your Digi Remote Manager account and click OK.

If the credentials are correct, your account will be added to the list and you will be able to work with your remote devices. You can add as many Digi Remote Manager accounts as you want so you can use devices from different accounts.

Note Your credentials are securely stored by PyCharm. In order to use this functionality, make sure PyCharm has enabled the passwords storage in File > Settings > Appearance & Behavior > System Settings > Passwords.