Menu
Close
Menu
Program Field
There are two different methods how you can program the robor arm, you can use python or Blockly programming.
Blockly
Blockly is a visual programming tool developed by Google that allows users to create code by snapping together blocks rather than typing text-based code. Each block represents a coding command or function, and users can drag and connect blocks to build logical sequences or functions. This block-based approach helps beginners, especially young learners, understand programming concepts without needing to know a specific programming language.
Python
In the Program Field, you can program the robotic arm using Python. This field runs as a Python script, so standard Python rules apply to your programming.
Standard Python Rules:
- Indentation: Use consistent indentation (typically four spaces) to define code blocks.
- Variable Names: Variable names must start with a letter or underscore, followed by letters, numbers, or underscores (e.g.,
robot_arm
,_myVariable
). - Comments: Use
#
for single-line comments and triple quotes ("""
or'''
) for multi-line comments to explain your code. - Data Types: Be familiar with basic data types such as integers, floats, strings, and lists.
- Functions: Define functions using the
def
keyword, followed by the function name and parentheses (e.g.,def move_arm():
). - Control Structures: Use
if
,for
, andwhile
statements to control the flow of your program. - Libraries: Import necessary libraries using the
import
statement (e.g.,import math
).