BlockPi: An Open Source Graphical Programming Platform for Raspberry Pi

BlockPi: An Open Source Graphical Programming Platform for Raspberry Pi

A graphical programming platform designed specifically for Raspberry Pi, built on Google Blockly, suitable for Raspberry Pi enthusiasts or children learning programming.

Features

  • Complete Blockly ported to Raspberry Pi, completely free to use.

  • Integrated Raspberry Pi GPIO control, supports Sense HAT, and will support more Raspberry Pi peripherals and features in the future.

  • Programs can run directly within the application and can be converted to Python code for easier learning of Python.

  • Supports both Simplified and Traditional Chinese, as well as English.

  • Supports saving and loading programs.

Prerequisites

Install the official latest Raspbian desktop system (Raspbian Buster with desktop and recommended software) on Raspberry Pi (models with 40-pin GPIO such as 4B, 3, 3B, 3B+).

If not, please ensure that Nodejs version 12 or above and Python 3 are installed in the Raspberry Pi system.

Installation

Download the latest .deb (recommended) or AppImage installation package from the release page and save it to your Raspberry Pi.

.deb

Double-click the .deb file to install directly.

Or use the terminal command:

sudo dpkg -i blockpi_1.0.1_armv7l.deb

Make sure to use the correct file name.

If the installation fails, it is usually due to missing necessary modules in the system. Enter

sudo apt install -f

After installing the modules, re-enter the installation command.

AppImage

Right-click the AppImage file, select file properties – permissions – execute – for everyone, and confirm. Double-click to run the program directly.

BlockPi: An Open Source Graphical Programming Platform for Raspberry Pi

If it is not the official latest system, you may need to manually install the prerequisites:

sudo apt update
sudo apt install python3-gpiozero sense-hat python3-sense-emu sense-emu-tools

After installation, you will see an additional BlockPi menu item in the Raspberry Pi menu.

BlockPi: An Open Source Graphical Programming Platform for Raspberry Pi

After starting BlockPi, you will see the graphical programming interface.

BlockPi: An Open Source Graphical Programming Platform for Raspberry Pi

BlockPi: An Open Source Graphical Programming Platform for Raspberry Pi

FAQ

Is the software paid? A: No, it is completely free.

What is the difference between .deb and AppImage? A: There is basically no difference, the .deb installation method adds the ability to turn off auto-saving code, while AppImage can automatically check for updates.

What is the difference between this and the built-in Scratch3 on Raspberry Pi? A: BlockPi can generate Python code and will update with more features that Scratch3 does not have in the future, including support for more sensors and AI features.

Are there user manuals or tutorials? A: Tutorials and cases will be updated on the project Wiki page in the future. They will also be published on Zhihu.

Development and Build

You need NodeJS version 12 or above stable version, as well as npm or Yarn (Yarn is recommended). If you use npm, replace yarn with npm in the commands below.

Clone the repository:

git clone https://github.com/alienzhangyw/BlockPi.git

Install:

cd BlockPi
yarn install

For how to create new blocks, refer to the Google Blockly documentation.

Package all block scripts:

yarn build:blocks

Package Python code generation scripts:

yarn build:generator

Run BlockPi:

yarn start

Package and release Windows version:

yarn dist:win

Package and release Raspberry Pi version:

yarn dist:linux

The Raspberry Pi version can only be packaged on non-arm architecture Linux systems (such as Ubuntu or WSL). If you encounter permission issues, add sudo before the command.

The most common issue during development and packaging is the downloading of required packages. There are many solutions available online, such as using domestic mirrors or using VPNs, which will not be detailed here.

Project address: https://github.com/alienzhangyw/BlockPi

Tutorial cases: https://github.com/alienzhangyw/BlockPi/wiki/%E4%B8%AD%E6%96%87%E6%95%99%E7%A8%8B

Author’s Zhihu column: https://zhuanlan.zhihu.com/BlockPi

Fun group discussion: https://talk.quwj.com/topic/797

Links in the text can be clicked to read the original text at the end

BlockPi: An Open Source Graphical Programming Platform for Raspberry Pi

More exciting content

DIY ultra-simple automatic sensing hand sanitizer

Manufacturing a high-tech magnetic fluid display screen

3D printing a Raspberry Pi 4B tablet computer

I look like a game controller, but actually it’s an adjustable power supply

3D printed laser gun target kit, biubiubiu……

Using Raspberry Pi and MCC 134 to set up remote temperature monitoring

Cool modification: An electric skateboard with a top speed of 40km and a range of 18km

Samytronix Pi: A desktop computer DIY with Raspberry Pi

BlockPi: An Open Source Graphical Programming Platform for Raspberry Pi

Leave a Comment

×