Ezblock Studio 3

Thanks for choosing our EzBlock Studio.

Note

This document is available in the following languages.

Please click on the respective links to access the document in your preferred language.

EzBlock Studio is a development platform developed by SunFounder designed for beginners to lower the barriers to getting started with Raspberry Pi.

It has two programming languages: Graphical and Python, and available on almost all different types of devices.

With Bluetooth and Wi-Fi support, you can download code, remote control a Raspberry Pi, on EzBlock Studio.

This includes the quick start guide of EzBlock Studio and other basic operations. Later we will add the use of each page and the introduction of related block or python functions.

Please do not hesitate to point out any inconveniences or errors, and any suggestions are welcome.

Here is the Email: cs@sunfounder.com.

Quick Guide :

Quick User Guide

The main optimization of EzBlock 3.2 is to switch the online service to offline mode, and add the import and export function of project files. At that time, the channel for new user registration will be closed, and registered users will be prompted after logging in to transfer the project offline. Online services will be closed after a period of time.

Note

The 3.2 update does not need to re-burn the image for the Raspberry Pi.

Install EzBlock OS

  1. Download the Raspberry Pi OS with EzBlock Pre-installed image file here:

  2. Unzip the package downloaded and you will see the .img file inside.

    Note

    Do not extract the .img file.

  3. Downlaod the tool - Raspberry Pi Imager from https://www.raspberrypi.org/software/. Click on the link for the Raspberry Pi Imager that matches your operating system, when the download finishes, click it to launch the installer.

    _images/image11.png
  4. When you launch the installer, your operating system may try to block you from running it. For example, on Windows I receive the following message. If this pops up, click on More info and then Run anyway, then follow the instructions to install the Raspberry Pi Imager.

    _images/image12.png
  5. Insert your SD card into the computer or laptop SD card slot. Then open Raspberry Pi Imager and click CHOOSE OS.

    _images/choose_os.png
  6. Go to the bottom of the page and select Use Custom. In the pop-up window, select RaspiOS-xxx_EzBlockOS-xxx.img that you downloaded in Step 1, and click Open.

    _images/use_custom.png
  7. Select the SD card you are using.

    _images/image14.png
  8. Press Ctrl+Shift+X or click settings icon to open the Advanced options page to set hostname, enable SSH and set username and password. You can choose to always use this image customization options.

    Note

    The hostname is set so that when you How to use EzBlock in a Browser, you can use the hostname to connect to your product. You can also leave it unset.

    _images/configure.png
  9. Then scroll down to complete the wifi configuration and click SAVE.

    Note

    wifi country should be set the two-letter ISO/IEC alpha2 code for the country in which you are using your Raspberry Pi.

    This step is optional, if you do not configure WIFI in this step, you can also use the app to configure it directly later.

    _images/image16.png
  10. Click the WRITE button.

    _images/image17.png
  11. After waiting for a while, you will be prompted to tell you that the image has been written to your Micro SD card and you can remove it. Then you can insert it into the Raspberry Pi.

    _images/burning2.png

Install EzBlock Studio

EzBlock Studio is an App for programming and controlling SunFounder Raspberry Pi robots, which allows beginners (students) to quickly get started with Raspberry Pi robot programming. It has built-in TTS, camera recognition, remote control, music/sound effects, and sensor control functions.

Open App Store (iOS) or Play Store (Android), then search and download EzBlock Studio.

Linux/Mac OS X system/Windows users can use EzBlock Studio in a browser, see How to use EzBlock in a Browser for more details.

_images/IMG_0407.PNG

Connect the Product and EzBlock

  1. Toggle the power switch of the Robot HAT to the ON position. After a while, you will hear a power-on sound, which means the Raspberry Pi has been successfully started.

    _images/slide_to_power.png
  2. Connect your mobile device (phone/tablet) to WiFi and turn on Bluetooth.

    _images/open_wif_bluetooth.jpg
  3. Now open the APP-EzBlock Studio, you will be prompted to allow EzBlock Studio access to the following 2 permissions.

    • Access photos, media and files on your device: If you are logged in and need to change your avatar, the APP needs access to your device’s photos; when you use the product’s photo feature, the APP needs this permission to save the photos.

    • Access your device’s location: This permission must be selected as Allow, otherwise APP will not be able to connect to the product via Bluetooth.

    _images/allow_access.jpg
  4. Click the Connect icon in the upper left corner.

    _images/sp221115_143525.png
  5. On the pop-up page, click Connect.

    _images/click_connect.jpg
  6. Now enter the Bluetooth connection page, it will automatically search for the corresponding Bluetooth, usually the product name is ezb-Raspberry, but the MAC address is different for different products. If you have more than one product, you can identify it by MAC address. Also this Bluetooth name can be changed in the next steps.

    _images/connect_bluetooth.jpg
  7. When the connection is successful, your product will make a “ding dong” sound and the app will prompt that the connection is successful.

    _images/connect_success.jpg
  8. If this is your first time using this product, you will be prompted for a quick configuration of it.

    _images/config.jpg
  9. Enter your Wi-Fi account and password.

    Note

    • If you have already configured Wi-Fi on the Raspberry Pi Imager, then this step will not appear and you will go directly to the next step.

    • This step is to configure WiFi for the Raspberry Pi, which needs to be the same WiFi network as your mobile device (phone/tablet).

    _images/connect_wifi.jpg
  10. Select the matching product.

    _images/select_product.jpg
  11. Give your product a unique name, which will be your Bluetooth name ( takes effect after restarting the product and app) and can also be used as hostname when you use EzBlock on a browser, see How to use EzBlock in a Browser for more details.

    _images/set_name.jpg
  12. If your product needs to be calibrated, there will be a prompt telling you that you can enter the calibration page by clicking Calibration Now. If it is not needed, the pop-up window disappears and returns to the home page.

    _images/calibration.jpg
  13. The calibration page of each product is different, but there is a reminder which part needs to be calibrated. You can click the corresponding part, and then refer to the Calibration Help to calibrate. After the calibration is completed, click Comfirm.

    _images/cali_page.jpg

Note

If you want to recalibrate the robot during use, please follow the steps below.

You can open the product detail page by clicking the connect icon in the upper left corner.

_images/calibrate0.png

Click the Settings button.

_images/calibrate1.png

On this page, you can change the product name, product type, view the app version or calibrate the robot. Once you click on Calibrate you can go to the calibration page.

_images/calibrate2.png

Open and Run Examples

  1. On the homepage, click Examples to enter the Examples page. If you just need to simply test these examples, you only need to click Run to make your product work.

    _images/imgIMG_0392.PNG
  2. If you want to view and modify the code inside, then you need to click Edit. The following picture is the programming page.

    _images/imgIMG_0393.PNG

Import or Export Projects or Libraries

Since it is now offline mode, you must know how to export and import the project to transfer it to other devices or share it through APPs.

Export Projects/Libraries

  1. When you have created new projects and selected Save, you will see them in My Projects.

    _images/ez32_myproject.png
  2. Your saved projects are sorted by product on the My Projects page, and you need to view them according to your product type.

    _images/ez32_picarx.png
  3. In the top right corner of each project there is an export icon that allows you to export them individually.

    _images/export_icon.png
  4. After clicking on it, a pop-up window will appear and you can choose to share the exported project file (.ezbpro) through different APPs. Or choose Save to Files to export the project to your device.

    _images/save_to_single.png
  5. If you want to export multiple items at once, you can click the Select option.

    _images/click_select.png
  6. Now select the projects you want to export, or use the Select All button.

    _images/select_all.png
  7. Once you’ve made your selection, click the Export icon to share the package (.zip) with different APPs, or select Save to Files to export them to your device.

    _images/export_zip.png
  8. Library exports are done in the same way, but are exported individually in .ezblib format and in multiple files in .zip format.

Import Projects/Libraries

Now let’s learn how to import projects or libraries into EzBlock Studio.

  1. Open the My Projects page, click the Import icon and select Choose File. The Import Project button on the home page is the same function.

    _images/import_icon.png
  2. In EzBlock Studio, you can only import .ezbpro, .ezblib and batch exported .zip format files from EzBlock Studio. Other files cannot be imported.

    _images/import_file.png
  3. If the project or library you are importing has the same contents as the project in EzBlock Studio, there will be a pop-up window reminding you to Keep both, Skip or Replace.

    _images/import_same.png
  4. Then they will be imported into different product categories depending on your files.

How to … :

How to Save Projects or Libraries(For Old Users)

EzBlock Studio will switch to offline mode starting with version 3.2, which means new users no longer need to register an account to save and transfer projects.

If you are an old user, you can still login to your account until February 28, 2023. However, it is recommended that you download the projects and libraries inside your account as soon as possible. Otherwise, all data cannot be retrieved.

Now let’s see how to save the projects or libraries.

  1. Click on the icon in the top right corner to login to your account.

    _images/login_new.png
  2. When you log into your account, you will see a pop-up prompt.

    _images/sp221116_103418.png
    • If you want to save your project locally, please click Save All Project Locally, it will take you a minute, and then you will be able to access your project directly without logging in.

    • Click Log out if you do not want to transfer items saved to the online service at this time. You can still transfer your items the next time you log in.

    • If you no longer need the items saved to the online service, you can click Delete Account and Log out.

  3. After clicking Save All Porjects Locally, you will see that it will detect all the projects and libraries in your account and download them all. The download here is not to a folder in your device, but to the My Projects page of the app.

    _images/ez32_download.png
  4. Once the download is complete, you will be prompted to go to the My Projects page to view the downloaded items. At this point, you can delete your account and logout, or if you are not very confident, you can just click Logout, and check the downloaded projects first.

    _images/ez32_view.png
  5. Now come to the My Projects page to see the downloaded projects. If you have multiple products, you can go to different product pages to view the projects.

    _images/ez32_download_myproject.png
  6. At this point if you want to export your project to your mobile device or share it through other APP, you can refer to Import or Export Projects or Libraries.

How to use EzBlock in a Browser

In addition to using EzBlock Studio on a mobile device, you can also use it in a browser.

The steps are as follows:

  1. First, you need to Install EzBlock OS. During this time you can set a hostname to connect to your Raspberry Pi in the browser.

  2. Open the browser and enter the following URL. Google Chrome is recommended.

  3. Then click the connect icon in the upper left corner.

    _images/click_connect.png
  4. And click Connect.

    _images/web3.png
  5. Enter the IP/Hostname, or enter the name you have given to the product.

    _images/web4.png

    Note

    If you have already connected your product on your mobile device, you can click the product icon in the upper left corner to get the IP.

    _images/IMG_0458.PNG
  6. When prompted that the connection is successful, you can run the examples or create your own porjects.

How to Create a New Project?

  1. Click New Project on the homepage.

    _images/sp221115_161408.png
  2. Enter the project name, select the programming mode (for novices, Block is recommended), and Confirm.

    _images/img_new_project2.png
  3. Now we get to the programming page.

    _images/img_new_project3.png
  4. Drag and drop block to program. Then click the icon at the bottom right to run.

    _images/img_new_project4.png
  5. After you’re done programming, you can simply exit and click Save. For more options, click the menu in the upper right corner.

    • Save: Saves the current project to the My Projects page.

    • Save As: Saves this project to My Projects with a new name.

    • Save As File: Save to the device’s folder. The project (.ezbpro) is downloaded to your computer if you are using Web access to EzBlock Studio. With a mobile device, you can save the project (.ezbpro) to the device folder or share it with the app.

    _images/img_new_project5.png

How to Use the Video Function?

  1. Drag the camera monitor on block to Start.

    _images/img_remote_camera1.png
  2. In Remote Control Page , drag the Video widget and run the project.

    _images/img_remote_camera2.png
  3. Now you can see the video.

    _images/img_remote_camera4.png

How to Use the Remote Control Function?

  1. Enter the Remote Control Page.

    _images/img_remote1.png
  2. Drag the widget you want, the configuration will also pop up.

    _images/img_remote3.png
  3. Go back to Programming Page, you can see the new block appears. Complete your code please.

    _images/img_remote5.png
  4. After you run the code, go back to the Remote Control Page, play it.

    _images/img_remote6.png

How to Use Library Function?

When you need to reuse the same code in multiple projects, you can use the library function in the menu.

_images/sp210809_111713.png

After writing the function, click create library in the Menu and select the function you want.

_images/create_libraries.png

Fill in a description for your library.

_images/sp210805_150848.png

When using it, click Import Library in the Menu. Find the one you want and click on Import.

_images/sp210805_151150.png

The results are as follows. You can click Expand Block to see the content of the function.

_images/sp210805_151105.png

Interface:

Home Page

When we open EzBlock, we can see the homepage, as shown below:

_images/sp210805_135127.png

2. Product

Product Information

_images/product_page.jpg

This is the product information page, which contains the product name (you name it), product type, Raspberry Pi IP, APP version, operating voltage and the current power of the product.

Settings

_images/settings.jpg
  • Edit Name: If you are not satisfied with the name you gave before, you can change it here.

  • Change Product: Change to another product.

  • Check for Updates: Check the current version of the app, and check if there is a newer version.

  • Calibrate: If you think your product is still a bit deviated during use, you can use this button to recalibrate it to the right position.

4. Examples

_images/sp210805_135846.png
  1. Back to home page

  2. Choose an example. Click Run to flash and run the program directly, and click Edit to enter the programming interface.

  3. To choose a programming language, there are two options: Blockly and Python.

Note

Before entering the Examples page, you need to select the correct product first.

5. My Projects

_images/my_projects_page.png
  1. Import projects or libraries.

  2. Select button: After clicking it, you can choose to select multiple projects or libraries at once, or select all to export or delete.

  3. Here are two categories My Projects or My Library.

  4. Your project will be saved under the corresponding product category.

  5. Select your personal project here. You can click Run to flash and run the program directly (if the project uses remote control, it will also take you to the remote control page), and click Edit to enter the programming page.

  6. The export icon is located in the upper right corner of each project or library.

6. New Project

_images/sp210805_143611.png
  1. Enter the name of the project.

  2. To choose a programming language, there are two options: Blockly and Python.

  3. Click to enter the programming interface.

Programming Page

When you write code (create new project, edit example, edit your personal project), you will enter the Programming Page. Shown here is the programming interface in blockly language. For programming in python language, please see Python Programming Page.

_images/sp210805_143809.png
  1. Return to the home page

  2. Choose a product

  3. Project name

  4. Help

  5. Menu

  6. Programming interface

  7. Remote control interface

  8. Debug Monitor

  1. Block Categories

  2. Programming Area

  3. Run

  4. Flash & Run

Block Categories

_images/sp210805_151353.png

Find the code block from here, and drag the code block into the Programming Area for programming. Please check the specific usage in Block Reference.

Debug Monitor

_images/sp210805_145042.png

Click the debug icon in the lower right corner, and a movable debug monitor will appear. The text of the print block will be displayed here.

Help

_images/sp210805_150120.png

After selection, ezblock tutorials will pop up, including FAQ, get started and reference.

Menu

_images/sp210805_150436.png
  • New Project: Use to create a new project.

  • My Projects: Use this button to go to the My Projects page to view, export or import projects or libraries.

  • Save: Adds the project to My Projects.

  • Save As: The project is saved to the My Projects page as a new file name.

  • Create Library: To create a library by selecting the functions in the project. For a detailed tutorial, please refer to: How to Use Library Function?.

  • Import Library: Import the saved library.

  • Save As File: Save to the device’s folder. The project (.ezbpro) is downloaded to your computer if you are using Web access to EzBlock Studio. With a mobile device, you can save the project (.ezbpro) to the device folder or share it with the app.

TIPS

You can long press the programming area or block to use some auxiliary functions.

_images/sp210805_151610.png _images/sp210805_151819.png
Menu of Block

Option

Description

Duplicate

Copy selected (and dominated by) blocks.

Add/Remove Comment

After clicking, a ? icon will appear at the top right of the block, which is used to write text that is helpful for reading the code. These texts will not be executed by the program.

Expand/Conllapse Block

When your code has more blocks, you can collapse them and expand them when necessary.

Disable/Enable Block

This function disables specific blocks without changing the program.

Delete xxx Blocks

Remove selected (and dominated by) blocks.

Help

Create xxx

Used in Vibration or Function blocks. It enables you to quickly create a block paired with the selected block (click create from the Function block, the call block appears).

Hightlight Function Definition

Used in the call block of funtion, allows you to find the funtion definition

Menu of Programming Page

Option

Description

Undo

Redo

Cancel Undo

Clean up Blocks

Align the blocks

Conllapse Blocks

Collapse all blocks

Expand Blocks

Expand all blocks

Delete xxx Blocks

Delete all blocks

Python Programming Page

If you use python language when creating a project, you can enter the Python Programming Page.

_images/sp210805_154924.png

You will need to refer to Python Reference to complete your project.

Remote Control Interface

For how to use it, please see How to Use the Remote Control Function?

_images/sp210805_144019.png
  1. Widget Categories

  2. Remote Control Area

_images/sp210805_152451.png

Click on the widget to display the message box, long press the widget or click the delete button to delete the widget.

Widget of Remote Control

Widget

Description

Joystick

The white dot is centered, and both X and Y values are 0. Drag the white point to the right to increase the X value; drag it upwards to increase the Y value. The ranges of X and Y are both (-100, 100).

Slider

When the white point is on the far left, the value is 0. Drag the white point to the right to increase the value. The range is (0, 100).

D-Pad

This is a control composed of 4 Buttons, each button is independent of each other. The value of the Button is 1 when it is pressed and 0 when it is released.

Button

The value is 1 when pressed and 0 when released.

Switch

When ON, the value is 1; when OFF, the value is 0.

Video

Please check How to Use the Video Function?

Digital Tube

It can display NUMBER (such as 123.3) or TIME (such as 11:55) like a real four-digit digital tube.

Pie Chart

It is used to indicate the proportion of the part and the whole in the data series. Each set of data should include a name and value.

Bar Chart

The data of multiple objects can be displayed intuitively for comparative analysis. Each object should include a name and value.

Line Chart

Continuous data of multiple objects can be displayed. Each object should include a name and value. Continuous data generation is based on multiple calls (usually, using loops).

Bulb

Like the actual LED, it lights up when 1 is written, and turns off when 0 is written.

Release Note

Ezblock Studio Release Notes

EzBlock Studio 3.2

EzBlock Studio will be switched to offline mode from version 3.2 and the online service will be closed on 2023/2/28 for user-friendly use. Thus, you can save your projects locally without registering and import them on different devices later.

Detailed Information

  • After EzBlock Studio goes to offline mode, old users can continue to log in and save cloud projects to local, but all new projects will be saved locally.

  • Registration portal is closed. New users are no longer required to register an account to use EzBlock’s project saving feature.

  • Add project import and export function in .ezbpro format, which allows you to transfer projects between devices or share projects with others.

  • Libraries can also be imported and exported in .ezblib format for transfer and sharing.

FAQ

  • What happens to my account?

    You have until February 28, 2023 to save all your projects in the cloud locally. Here’s how to do it: Sign in to your account on EzBlock Studio and select “Save all projects locally” in the pop-up window to save all your cloud projects to My Projects page in one click, then export to your device’s folder or share them through the app using the Export button.

    After that, EzBlock Studio will close the online service and clear all online data. You can also delete all your data by clicking the “Delete Account and Log out” button after you have saved all your projects and libraries.

  • How is the web version of EzBlock Studio?

    You can still access EzBlock Studio via the web page at http://ezblock.cc/ezblock-studio after upgrading to version 3.2.

    Data will be saved in your browser, so be sure to clear your browser data. Of course, you can export your project or library to your computer for sharing.

  • How to transfer projects and libraries between devices?

    After exporting projects to .ezbpro format and libraries to .ezblib format, you can transfer them to other devices and then import them.

  • How to export libraries/projects?

    For a detailed tutorial, please refer to: Export Projects/Libraries.

  • How to import libraries/projects?

    For a detailed tutorial, please refer to: Import Projects/Libraries.

EzBlock Studio 3.1

Main Optimization

The main optimization of EzBlock 3.1 is the compatibility with the built-in Bluetooth of the Raspberry Pi, no need to use an expansion board with Bluetooth module.

Note

  • The old version of the robot can also be used normally after burning the new image. The bluetooth module on the original robot hat will not conflict with the new system.

  • The EzBlock Studio 3.1 version should be used with the EBlock 3.1 image (https://ezblock.cc/download/v31.html).

Add

  • A custom Bluetooth name function has been added to the app to avoid the problem that multiple devices are indistinguishable. (Reboot to take effect.)

  • Added three sound effects for boot, successful connection, and disconnection, which gives more feedback.

  • The LED next to the power indicator will be used as a bluetooth indicator, which is always on when connected and flashes slowly when not connected.

  • (Android) Add a full-screen input box to prevent the input box from being blocked.

Optimization

  • Optimize the battery display, now you can see more accurate information on the APP.

  • Optimize the display of product example images and personal information icons.

Fix

  • Fix a series of problems of Bluetooth search and Bluetooth connection.

  • Fix the problem that the product name is not displayed after the wifi configuration.

  • Fix the problem of product information not being saved after modification.

  • Fix the problem that the picture cannot be saved after taking pictures in the remote control page.

EzBlock Studio 3 2021.06.08

Improve the product connection

  • Improve the connection method: Compared with the Bluetooth communication of EzBlock 2, EzBlock 3 uses Websocket to communicate, which is much faster.

  • Improve the connection process: EzBlock 3 uses Bluetooth to assist with the product’s fast Wi-Fi connection.

Home Page

  • Remove the carousel.

  • Remove the product selection page and change it to a pop-up window.

  • Remove the way you must log in to get to the home page.

  • Add My Project entry.

  • Add Product Information pop-up window button. This Product Information pop-up window is used to show the product name, product type, IP, version, working voltage, and power.

  • Add online update function of product image.

  • Add product calibration function.

  • Add product name modification function.

  • Add the Menu function in the upper left corner.

  • Optimize the pop-up window for New Project button.

Examples Page

  • Beautify the UI.

  • Add quick run/edit button.

  • Add remote control or IoT prompt icon.

Programming Page

  • Optimize the arrangement of Programming, IoT, Remote Control and Debug Monitor buttons.

  • Add product connect button in the top left corner.

  • Add Stop/Run program button.

  • To save the project and enter the IoT page, make sure that you have logged in to your account.

Personal Info Page

  • Remove the settings page.

  • Add product category function to My Project page.

Other

  • Change the font of all pages.

  • Add the function of entering IP or hostname on the web to connect to the product.

FAQ

Check the APP Version

Confirm the app version by the following method, and then go to the FAQ of different versions.

Click the Menu button in the upper left corner.

_images/click_menu.jpg

Then click the Version button.

_images/version.jpg

Now you can view the version.

Note

If it is EzBlock 3.1, it is recommended to update to the new version, for a detailed tutorial please refer to: Quick User Guide.

_images/check_version.png

EzBlock Studio 3.1

  1. APP can’t search Bluetooth

    • Power on the product and see if there is pleasant music (not only current “zi~” sound). If not, please Install EzBlock OS again.

    • whether the Bluetooth of your mobile device is turned on or not.

    • Whether the app is allowed to access the device’s location.

    • Some mobile devices also require location services to be turned on.

    • Check the power level. If both power indicators are off, or only one is blinking; the power level is low, please charge the batteries.

    • If all the above methods have been tried, try to press RST button, or restart the product and APP.

  2. The APP searches for Bluetooth, but cannot connect.

    • Power on the product and see if there is pleasant music (not only current “zi~” sound). If not, please Install EzBlock OS again.

    • Check if the BLE or USR light on ROBOT HAT is always on (which means the product is connected by other devices), if yes, disconnect the other devices or restart the product.

    • If all the above methods have been tried, try to press RST button, or restart the product and APP.

  3. APP can’t connect after configuring WIFI.

    • Check if the country, SSID and PSK are correct.

    • Check the network status of this WIFI.

    • Check the power level. If both power indicators are off or only one power indicator is blinking; the power level is low, please charge the batteries.

    • Check whether the configured WiFi and the Wi-Fi connected by the mobile device are the same.

  4. The Video block doesn’t work?

    _images/video_not.png

    When using the video function on the web page, if your code does not report an error and has run successfully, but you do not see the shot on the remote control page, you need to check the following 2 situations:.

    • Check the network status and retry.

    • For the latest version of Google Chrome, you need to set it manually.

      Open Google Chrome and go to: chrome://flags/page.

      _images/chrome1.jpg

      Search for: Block insecure private network requests

      _images/chrome2.jpg

      Set it to Disabled and then click Relaunch.