Lab's Objectives:
AI Mini Arm G.9-12: Lab 1
Objective
Students will learn and familiarize themselves with our block website and the blocks needed to move the robotic arm. They will recognize what part of the robot is its software and hardware.
Activity
Students will learn about servos and the angles needed to move them.
Students will be able to combine the motions of the sensors and make them into a cohesive move.
Assessment
Students will be able to combine the movements of the servos and solve different problems with them.
Students will be able to breakdown intricate parts of each move to be able to control the arm.
Google Slides
Build Video
Add paragraph text. Click “Edit Text” to update the font, size and more. To change and reuse text themes, go to Site Styles.
Lab Summary:
Required Materials:
Heading 3

Part 1
Building upon the introductory work completed in Lab 1, Lab 2 shifts our focus to the essential coding foundations that will support all future labs in this course. A strong understanding of these core concepts is crucial, as they form the backbone of programming for the AI-powered C2G-Mini Arm. This robotic platform offers students a high degree of creative freedom, allowing them to design, code, and execute personalized movement sequences and interactive functions.
In this lab, students will begin exploring how to translate logical thinking into working code, laying the groundwork for more complex automation tasks ahead. Through hands-on practice and guided instruction, students will gain the skills necessary to program precise movements, respond to input, and start customizing behaviors in meaningful ways.
The following key concepts will be introduced and practiced in Lab 2:
Some important concepts:
Creation & Usage of Functions
Loops and conditional statements
Ability to create, import and upload libraries
Basics in syntax for Python
1) Functions are fundamental building blocks in Python that allow programmers to organize, reuse, and simplify code. A function is a named block of code designed to perform a specific task. By using functions, we avoid repeating the same code multiple times, making our programs more efficient, readable, and easier to debug or update.

2) Loops and conditional statements are essential control structures in Python that allow programs to make decisions and repeat actions, making code more dynamic, efficient, and responsive.
Conditional Statements (like if, elif and else) enable a program to make decisions based on specific conditions. They allow the code to choose different paths of execution depending on whether certain criteria are met. This is crucial for creating programs that can react to inputs or changing situations.
Loops (for and while) allow code to be repeated multiple times without needing to write it out manually. This is especially useful when performing repetitive tasks, processing data sets, or automating sequences of actions.

3) Libraries in Python are collections of pre-written code that provide functions, classes, and tools to perform common or complex tasks efficiently. Working with libraries allows developers to avoid “reinventing the wheel” by using reliable and optimized code built by others—or by themselves.
Creating Libraries: When a programmer writes a set of functions or classes that might be reused across multiple projects, they can organize them into a custom library (or module). This helps promote reusability, and clean code management, especially in large projects. For example, a custom library could include pre-defined functions for controlling different components of the C2G-Mini Arm.
Importing Libraries: Python provides a simple way to access both built-in and third-party libraries using the import statement. Importing a library gives your program access to powerful tools—like math operations (math), data handling (pandas), robot control or even artificial intelligence. This saves time and allows programmers to build complex applications more efficiently.
Uploading Libraries to a Microcontroller or Environment: In robotics projects—like programming the C2G-Mini Arm—libraries often need to be uploaded to a microcontroller (such as an Arduino, Raspberry Pi, or ESP32). This ensures the device has access to the code required to handle tasks like motor control, sensor reading, or communication protocols. Uploading libraries makes it possible to bring your Python code into the real world, allowing physical systems to operate based on digital instructions.

