Skip to content

Blockly Python Executor

A powerful visual programming environment that allows you to create Python programs using drag-and-drop blocks, with special support for drone control and automation.

Blockly Python Executor

Features

🧩 Visual Programming

  • Drag-and-drop interface - Create programs without writing code
  • Real-time code generation - See Python code generated as you build
  • Comprehensive block library - Logic, loops, math, text, lists, and more

🚁 Drone Control

  • Direct drone integration - Control PMini drones through visual blocks
  • Real-time telemetry - Monitor drone status, position, and battery
  • Flight control blocks - Takeoff, land, hover, move, and turn commands

⚡ Live Execution

  • Terminal integration - Execute code and see results instantly
  • Error handling - Clear error messages and debugging support
  • Code export - Save your programs as Python files

🎨 Modern Interface

  • Responsive design - Works on desktop and tablet devices
  • Dark/light themes - Choose your preferred appearance
  • Floating telemetry - Monitor drone data in real-time

Quick Start

  1. Install the application for your platform
  2. Connect to a drone server (optional)
  3. Drag blocks from the toolbox to create your program
  4. Click "Run Code" to execute your Python program

What You Can Build

Basic Programming

  • Mathematical calculations and algorithms
  • Text processing and manipulation
  • Data structures and list operations
  • Control flow with loops and conditions

Drone Automation

  • Automated flight sequences
  • Mission planning and execution
  • Real-time monitoring and control
  • Custom flight patterns

Educational Projects

  • Learn programming concepts visually
  • Understand Python syntax and structure
  • Experiment with algorithms safely
  • Create interactive demonstrations

Architecture

graph TB
    A[Blockly UI] --> B[Python Code Generation]
    B --> C[Backend Server]
    C --> D[Python Execution]
    C --> E[Drone Server]
    E --> F[PMini Drone]
    C --> G[Terminal Output]
    C --> H[Telemetry Stream]
    H --> A

Getting Started

Ready to start building? Check out our Installation Guide to get set up, or jump straight into the Quick Start tutorial.

Examples

Simple Math Program

# Generated from blocks
result = 5 + 3 * 2
print("The result is:", result)

Drone Flight Sequence

# Generated from blocks
from pmini_sdk_python import SyncDroneClient

drone = SyncDroneClient("localhost:50051")
drone.connect()

drone.takeoff(2.0)
time.sleep(3)
drone.goto(1, 1, 2)
drone.land()

drone.disconnect()

Support

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.