Question: How do I make an extension for mBot?


#1

I want to create extension for mbot starter, how can ı do it? i see .mext file which platform can ı create it? Can I convert extension my mblock block codes?


#2

I had trouble starting out too, but these few pages might get you started:


You can also try to follow some of the guidance in this post:


#3

Hi, @ozgetasmanisa, see @CommandeR’s very useful response. You may also find this useful:

Add an Extension

Different from devices, device extensions or sprite extensions can be created through templates. Currently, a default Arduino template is provided for Arduino extensions and a universal template is provided for other extensions.
For details about the default Arduino template and universal template, see:

https://www.yuque.com/makeblock-help-center-en/extension-builder/arduino-template
https://www.yuque.com/makeblock-help-center-en/extension-builder/general-template

This page describes how to create an extension through the universal template.

1. Add an extension:

Go to https://ext.mblock.cc and create an account or sign in to begin developing extensions for mBlock.
Choose My Plugin > My Extension and click Add extension.

2. Set the basic information:

(1) ID

ID is the unique identifier (ID) of the device, used for identification by developers or programs.
Identifiers can be set to a combination of lowercase characters or digits. If multiple words are used, it is recommended that you use the symbol “_” to separate them, for example, arduino_uno and codey.

(2) Version

Version is the version number of the project file, used by developers to manage versions.
A version number must be a three-digit one, X.X.X.

(3) Name

Name is the name of the device, which is to be displayed on the UI.
It is recommended that you set the device name to a maximum of six characters. (It can be higher).

(4) Description

Briefly describe the functions of the extension.
After you publish the extension, the description you have entered is displayed under the image of the extension in the extension center of mBlock 5.

image

(5) Cover

Cover of the extension, which will be displayed in Extension Center of mBlock 5.
image

Image formats (recommended):

  • File extension: .jpg
  • Dimensions: 600 × 372

Note: Images may not contain advertisemnts or adult content or your extension will be rejected.

(6) Support platform

Set the platform(s) to be supported by the extension. Two options are available:

Note: Only mBlock can add support for mBlock App.

(7) Support device/sprite

Set the device(s) or sprite(s) to be supported by the extension. For example, if codey is added, the extension will be available for Codey only.

3. Configure the extension:

(1) Open the editing page

Choose My Plugin > My Extension and click the “Edit” button of the extension to be configured.

(2) Basic information

The basic information is the information you set in step “2. Enter the basic information”, and you can click this tab to modify it.

(3) Blocks settings

Check out this page to learn how to configure blocks.
https://www.yuque.com/makeblock-help-center-en/extension-builder/configure-blocks

(4) Common code settings

Upload source files or directly compile code. (External libraries, mostly needed for device extensions or devices).

(5) Custom widgets

Set the customized widgets to be invoked by blocks.

(6) Transcode settings

Set the transcoding language(s) of the blocks.
Currently, the following languages are available:

  • Arduino C
  • Python
  • JavaScript

(7) Translation settings

Enter the translations of texts in the target language(s). Multiple languages are supported.

(8) Extension download

Choose My Plugin > My Extension and click the “Download” button of the extension to be downloaded.

mBlock 5 Extension Builder packs the device or extension (block set) into a .mext file.
You can download the .mext file and drag it into the mBlock 5 PC app to debug and test the device or extension.

Note: After being dragged into mBlock 5, the .mext file overrides the exsiting device or extension. To remove the device or extension from the client, you need to delete it from the local disk. For details, see https://www.yuque.com/makeblock-help-center-en/mblock-5/function

(9) Preview

Click the “Preview” button of the extension to be previewed.

(10) Delete

Click the “Delete” button of the extension to be deleted.

Note: The deletion can’t be undone. Take caution when deleting an extension.

I hope this helps you. If you have any more questions, refer to the docs at
https://www.yuque.com/makeblock-help-center-en/extension-builder/create-extension
and mention me as @Best_codes.

Best of luck!


#4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.