Pymakr Plugin Installation for Visual Studio Code
Pycom also supports Microsoft's Visual Studio Code IDE platform with the Pymakr Plugin. To download Visual Studio Code, navigate to VS Code.
Please follow these steps to install the Pymakr VSCode Extension:
- Ensure that you have VSCode installed and open.
- Navigate to the Extensions page, using the 5th button in the left navigation
- Search for Pymakr and click the install button next to it.
- Within a few minutes, a Reload button should appear. Press it to reload VSCode.
- That’s it! You’ve installed the Pymakr Extension for VSCode
After installing, you need to do some configuration before the extension connects to your board. This is also listed in the terminal after the first time you installed the plugin:
- Connect your Pycom device to your computer via USB. Remove the wire between GND and G23, before plugging in your device, if you have just finished upgrading your firmware!
- Open 'Global Settings' (this opens automatically after first install).
- Fill in the correct IP or serial address of your Pycom board in 'address' (When using serial, use the 'List serial ports' to find the correct serial address).
- Save the file and connect using the 'Connect' command or the 'Pycom Console' button.
- Open a MicroPython project with main.py and boot.py files.
- Start running files and synchronizing your project.
You can also connect to your device via WiFi as the device can open a telnet server. For more information please see the section below.
Connecting via Serial USB
- Ensure that the Pycom device is turned on and connected (Normal or Safe Boot Mode)
- Open VSCode and verify that the Pymakr extension has been installed
- Open the terminal if it wasn't open yet, using
Intergrated Terminal(or the ``^+``` shortcut)
- Now click the
all commandsbutton on the bottom and click
List serial ports. This will copy the first serial port to the editor's clipboard
- Open the Global Settings file (also using
all commands) and paste this address into the 'address' field
This process is easiest with either a Pycom Expansion Board or a Pytrack/Pysense as the addresses are automatically selected. For external products such as FTDI USB Serial Cables, the serial address may need to be copied manually. Additionally, the reset button on the device may also need to be pressed before a connection message appears.
If there are issues connecting over USB with the Pymakr Plugins, ensure that the correct FTDI drivers are installed. This issue is related to missing Windows drivers.
Connecting via Telnet
After installing the Pymakr Plugin, a device may be connected via the telnet interface. Please see the following steps:
- Ensure that Pycom device is turned on and connected (Normal or Safe Boot Mode).
- Connect the host computer to the WiFi Access Point named after your board (the SSID will be as follows e.g. lopy-wlan-xxxx, wipy-wlan-xxxx). The
passwordis www.pycom.io. You may also connect your Pycom device to your router with a fixed IP (remember to record the IP address!).
- Click the 'all commands' button and click Global Settings.
- By default, the address will be listed as 192.168.4.1. If not, change this to 192.168.4.1 . If you've connected your device to your home network, this will likely be different.
- The default
passwordare micro and python, respectively.
Use either the
Connect command or click the
Pycom console button on the left bottom and the connection process will take place. Upon completion, a message stating ‘Connecting on 192.168.4.1...’ will appear, followed a
>>> prompt if successful.