Menu
Program Field
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
).