toc Tools/Features more_vert What's in this document more_vert Pymakr Online > Tools/Features

Tools/Features

There are two different ways of opening Pymakr Online. Each way has some differences on the features and purposes. Read more at How to Open Pymakr Online

Pymakr Online linked to a device

If you open Pymakr Online from a device page, Pymakr will be linked to that device.

Note: Your device needs to be online in order to be reachable by Pymakr Online

Terminal

Just like Pymakr Plugin, Pymakr Online also has a REPL (Read Evaluate Print Line) terminal. The REPL allows you to run code on your device, line by line. To begin coding, open Pymakr from a device (device’s page > pymakr tab > open Pymakr button), go to the terminal and start typing your code.

Download a file

When Pymakr is loaded, the IDE will request the device its hierarchy (the folder structure). If you open a file that has never been opened in Pymakr Online before, that file’s content will be downloaded and saved on the cloud, so the next time you open that same file, the content download won’t be necessary, unless you want to. Maybe you changed that file’s content in somewhere else and want to force a download to get the current content which is in the device.

To download the file from the linked device, click on the download icon next to the file name at file tree.

That will download the file content from the device and save it into the cloud.

In this case, that file has been updated yesterday.

After downloading the main.py content from the device.

Upload a file

After making any changes in a file, you will be able to upload it into your device by clicking on “Save and Upload” link.

Note: That will upload only the current file.

After downloading or uploading a file, its content is stored on the cloud.

Update Hierarchy

If you want to refresh your device’s hierarchy in Pymakr, you should click on Refresh Hierarchy icon next to your device name. That will request the hierarchy from the device, creating or deleting folders according to your device’s file hierarchy.

Pymakr Online not linked to a device

Pymakr Online can be opened without being linked to a device, from Pymakr Online initial page.

Since there’s no device linked in this way of opening Pymakr Online, there are no device related actions here (download file, device activity indicator etc). Instead, you decide what you are going to do with your code: upload to a project, download a zip file or upload to a device.

Before exporting your project, you first need to import a project into Pymakr or start with a blank project:

Import code into Pymakr Online

Pymakr Online initial page

1. Blank project

This will open Pymakr Online with the essential files of MicroPython project (main.py and boot.py).

2. Project/Release

  1. After clicking on Project button, you will see this page, where you must choose one project:

  1. And finally, choose the release you want to work with. That will open Pymakr with the files of the selected release.

3. Device

At this section you can import the code from a device and work with it in Pymakr Online. Note this won’t have any connection to any device once it’s loaded.

  1. Choose the device you want to work with:

  1. If you already worked with that device in Pymakr Online, you can use the latest saved code on the cloud, so the device doesn’t need to be online, or even turned on. That will instantly open Pymakr with that code.

If you want the current files from the device and you are not sure if the saved code on the cloud is up to date, you can download those files from the device by clicking on “Request files from device” button. That will bring you to another modal, which will show you the download progress.

Once the download has been completed, you can now work with the device’s files in Pymakr Online:

!

4. Zip file

This feature allows you to upload a zip file of your project into Pymakr Online and start to work with it from there. The zip file can not be bigger than 4MB.

5. Github Repository

  1. Firstly, type the repository name you want to import your code from and press enter:

!

  1. Then select your repository by clicking on it.

!

  1. Select the branch

!

  1. Wait for a few seconds until the download of the files from the selected branch is completed and then you can start working on Pymakr with those files!

!

Note: There’s a usage limit of the Github API. You won’t be able to search a lot and select different repositories in the same day. Use this feature with moderation.

Save/Export

To export your project, ensure that you have opened Pymakr Online from the Pymakr initial page (accessible from the sidebar menu) and not from the device page. For any option here, the size limit is 4MB.

  1. Click on Save/Export button.

  1. Choose an option:

  • Upload to a project will be released soon.

  • Create and Download a zip file from all of the files from your project.

  • You can also export to a device. This modal will open after clicking on “UPLOAD TO DEVICE” button. Note that your device needs to be online in order to receive the files from Pymakr Online.

  • Wait while Pymakr Online is uploading your project to the selected device.

  • Once the upload is done, your device will restart and load the new code.

Create a new file or folder

To create a file or folder in Pymakr Online, disregarding of how you opened it, you just need to right click on the folder you want to create the file or folder in.

In this case, I’m creating a folder called ‘new-folder’ under the project root. For that, I right clicked on the project name.

Now type the name of the file/folder:

Note: Pymakr Online only supports the formats .py .txt .log .json .html .js .cet .crt A folder name can not contain dots (.)

If you want to delete a folder or file, right click on the item to be deleted and then click on “Delete file” or “Delete folder”.

 

Previous Next