Learn computer systems with a robot Python, wireless, encryption, and AI

Students extend one small Python program through eight steps: input, process, memory, output, feedback, wireless messages, encryption, computer vision, AI, and an AI agent. Classes are available online or in person in Apgujeong, in 1:1 and small-group (1:n) formats.

Stopping conditions come before anything that moves. The first run happens with the wheels lifted, and each movement and repeat count is bounded. No marker or an armour-hit event causes a stop. Armour reacts after contact, so it is not treated as obstacle avoidance.

Written by the CIT education team | Reviewed by the CIT curriculum team | Last checked 9 August 2026 | Next review when DJI updates S1 support or its command list

The robot students actually work on

This is the RoboMaster S1. Rollers sit at an angle on all four wheels, so it can move sideways without turning first. A single camera sits on the gimbal at the front, and that one camera is the robot's only window onto the world.

Side view of a real RoboMaster S1 showing its four mecanum wheels and the camera mounted on the gimbal
The chassis is below, the gimbal above. They can turn independently, or one can be set to follow the other.
A real RoboMaster S1 seen from above, showing the chassis and the angled rollers on its four mecanum wheels
Mecanum wheels. Drive the four at different speeds and the robot travels diagonally. In class, students measure the gap between the distance they commanded and the distance it actually covered.
Close-up of a real RoboMaster S1 with the camera lens on the front of the gimbal filling the frame
Through this lens the robot recognises five things: markers, lines, people, robots and poses. Anything else is the laptop's job.

Photographs by KKPCW, Wikimedia Commons, CC BY-SA 4.0

This course teaches only what actually runs on an S1

Most RoboMaster examples online assume an EP. Follow them and a student learns code that does not run on the robot in front of them, with no way to find out why. CIT checks every call used in class against DJI's published S1 command list.

Only on the EP

  • The PC Python SDK. DJI documents it for the EP and EP Core.
  • Extension distance-sensor and sensor-adapter APIs. These belong to EP and EP Core hardware.

What we do on the S1

  • Students type code that runs inside the robot, in the app's Lab Python.
  • They drive the chassis and gimbal by the numbers and measure the error.
  • Students verify bounded movement, explicit stops, no-marker stops and armour-hit stops.
  • Pre-contact ranging is not assumed as an S1 Lab safety condition.

Naming which side saw what

The S1's built-in vision is fixed at five detectors: marker, line, person, robot and pose. Lab Python cannot reach camera frames, so a student's own model cannot run inside the robot. It runs on the laptop instead.

Treat the two as one thing and a student can no longer say what their own system knows. In class we always record which side made which judgement, and the decision to stop stays with the robot as well. Recognition on the robot is fast but fixed in kind; YOLO on the laptop is slower and sees far more.

A classroom scene: an educational robot inside a safety boundary, checked alongside object detection results on a laptop screen
Concept image for CIT classes. Detections are logged as evidence in an experiment table, not treated as answers.

IMPLEMENTATION ARCHITECTURE

Grow one implementation from simple input and output to an AI agent in eight steps

Every step keeps the previous code, so students can see exactly where a new concept enters. Python is not AI itself: it gives inputs names and types, then connects process, memory, rules, communication, AI, and output.

  1. 01Input and outputstep_01
  2. 02Processstep_02
  3. 03Memorystep_03
  4. 04Feedbackstep_04
  5. 05Wirelessstep_05
  6. 06Encryptionstep_06
  7. 07Vision and AIstep_07
  8. 08AI agentstep_08
  1. 01 INPUTInput

    Buttons, a light sensor, camera Frames, and wireless Messages cross the system boundary.

    Python · RobotInput, Frame, and Message dataclasses give each value a name and type.

  2. 02 PROCESSProcess

    The program cleans raw values, measures pixels, and asks a learned AI model for a prediction when needed.

    Python · process_input(), measure_bright_region(), and encode_message() each own one job.

  3. 03 MEMORYWorking memory

    Current and previous values, the latest AI candidate, and its run of fresh frames live briefly during execution.

    Python · WorkingMemory and ObservationMemory make values and their lifetimes visible.

  4. 04 DECIDEDecision and permission

    If rules and risk-specific thresholds select a possible output. A lower person threshold can only make a protective stop arrive sooner.

    Python · decide() and evaluate_prediction() check score, freshness, and permission together.

  5. 05 OUTPUTOutput

    The system emits display text, LED, sound, encrypted bytes, and a safety state. The laptop steps always keep the chassis at STOP.

    Python · RobotOutput makes the boundary between human-facing and robot-facing output explicit.

  6. 06 FEEDBACKFeedback

    A new input returns after each output and is compared with the previous value. Loss, delay, or error leads to HOLD or STOP.

    Python · tick(), timestamps, and traces explain the next loop and its causes.

PYTHON ONE-TICK TRACE

How one input becomes an explainable output through real project functions

Every box uses a name from the project. The final SystemTrace lets a student walk backwards through the values and decision that caused the output.

  1. 1 INPUT →RobotInput(
    button, light
    )

    raw values

  2. 2 PROCESS →process_input(
    raw
    )

    clean values

  3. 3 MEMORY →memory.update(
    processed
    )

    current + previous

  4. 4 DECIDE →decision =
    decide(snapshot)

    if + policy

  5. 5 OUTPUT →make_output(
    decision
    )

    display·LED·STOP

  6. 6 EXPLAIN →SystemTrace(
    ...
    )

    cause trail

  7. 7 FEEDBACK ↺system.tick(
    next_input
    )

    new input

The laptop project verifies every stage without motion. A separate S1 Lab Python example teaches physical output with short actions, an explicit stop, and teacher supervision.

Memory and storage are different. WorkingMemory briefly holds current and previous values while the program runs. Python files and AI model weights remain after shutdown. A model weight is a number learned from examples, not a record remembering the current student or scene.

Computer vision, AI, and an AI agent are not synonyms

Computer vision

Technology that turns image pixels into measurements such as location, colour, shape, and candidate labels.

Displaying a camera feed is not by itself computer vision, and a box is evidence: not a confirmed understanding of reality.

Artificial intelligence

A learned model uses patterns from examples to predict or generate something for a new input. YOLO detection is one example.

HSV thresholds, if rules, and a watchdog remain rule-based code even when they run automatically.

AI agent

The whole system repeats goal, observation, memory, decision, action, and feedback. RobotAgent connects an AI prediction to an explainable Python policy.

One AI score is not permission to act. This project's chassis output is always STOP, and an object result is shown for human confirmation only.

RISK-WEIGHTED THRESHOLD TREE

A possible person and an object action should not share one threshold

The 0.30 and 0.70 below are comparison values for class, not defaults. Real values must be measured again on fixed validation data, camera, lighting, and distance.

EXAMPLE INPUTperson candidate 0.36 · object candidate 0.74↓ Python compares class, freshness, and risk policy
IF person ≥ 0.30

STOP · SLOW · ALERT

Missing a person costs more than an unnecessary stop, so a protective output arrives early. This score never authorises approach.

IF object ≥ 0.70 + 3 FRESH FRAMES

Display for human confirmation

Even after higher confidence and several fresh observations, the result is only explained on screen. A teacher confirms it while the chassis stays at STOP.

ELSE · UNCERTAIN OR STALE

HOLD · observe again

Low, unstable, or old observations wait for the next frame, another sensor, or human confirmation while motion stays zero.

Key idea: lowering the person threshold means making the robot easier to stop, not easier to move.

PERSON-SAFETY CANDIDATE

A miss costs more

Lower protective threshold → STOP, SLOW, or ALERT only

ORDINARY OBJECT DISPLAY

Measure both errors

Validated threshold → candidate box and label

OBJECT RESULT CHECK

Measure false explanations too

Higher evidence + several frames → teacher-confirmation display

STALE OR MISSING INPUT

Old commands are dangerous

Regardless of score, TTL + watchdog → zero motion

Classwork and evidence by grade band

ELEMENTARY · GRADES 4-6

Role cards and one saved scene

Six roles pass a frame and a stop card. The evidence is a six-arrow explanation, the three concepts in the student's own words, and a safe stop.

MIDDLE SCHOOL

Real data and state tracing

Students follow RobotInput, JSON bytes, ciphertext, AI predictions, and consecutive-frame counts through tables and traces.

HIGH SCHOOL

Modules, security boundaries, and tests

Students test interfaces, message loss and latency, tamper rejection, stale data, and threshold policies with fake inputs and unit tests.

How a Message crosses a wireless link as encrypted bytes

Wireless communication is the path that carries a message through the air. Encryption locks the content while it travels. Students draw meaning, representation, transport, protection, and permission as separate layers.

  1. 1. Meaning → Message → readable JSON bytesA Python dataclass groups sender, kind, value, and timestamp, then JSON/UTF-8 encodes them. Changing representation is encoding, not encryption.
  2. 2. Packet → WirelessLink → arrival or lossA wireless link carries a packet, but it may be delayed or disappear. The receiver checks the timestamp and freshness; failure or an old message becomes HOLD or STOP.
  3. 3. Encrypt + authenticate + authoriseThe maintained cryptography library's Fernet locks content and detects tampering. Permission for a person or program to cause an output is still checked separately.

Layers stay separate. A Wi-Fi password protects network access, TLS protects a path, and app encryption protects a message. Permission and safety rules decide what even a valid message may do. Elementary students use a locked-box picture, middle-school students inspect bytes and loss, and high-school students test keys, tampering, and authorisation boundaries.

See it move before you build it

These are DJI's own videos. Everything shown in them is a built-in app feature. In class, students write the same behaviour themselves, one line at a time, in Lab Python.

An introduction to what the S1 is. Official DJI video
Why a mecanum wheel can carry the robot sideways. Official DJI Support video
Once you have watched which axes the gimbal turns on, commanding it by angle reads much faster. Official DJI Support video

Six chapters, 28 lessons

Each lesson runs 80 to 100 minutes. Students extend eight runnable Python steps across 28 lessons. Elementary role work, middle-school data tracing, and high-school Python engineering differ in depth, but share one system map and safety standard.

1. A robot is a computer system

Classify robot sensors, buttons, and cameras as inputs; Python as process; and LEDs, displays, and sound as outputs, then design a safe first run.

2. Input, process, memory, output, and feedback

Trace values from RobotInput to SystemTrace, distinguish working memory from file storage, and experiment with loops and state change.

3. Messages, wireless, and encryption

Turn a Message into JSON bytes and a packet, test loss and delay, and distinguish encoding, encryption, integrity, and authorisation.

4. Computer vision, AI, and confidence

Compare pixel measurement with learned prediction, read labels and confidence as evidence rather than truth, and count false positives and false negatives.

5. Decision, safety, and an AI agent

Choose thresholds by error cost, require fresh observations and permission, then build the observation→memory→decision→output→feedback loop.

6. Integration, testing, and explanation portfolio

Connect eight steps and 13 system diagrams into one story, then use unit tests, error tables, and run traces to prove the system fails safely.

Who it is for, and what you need

A good fit for

  • Students in grades 4-12 who want to explain how a robot and AI system connect at an age-appropriate depth
  • Students starting with role cards and saved inputs, students tracing real data and state, or students editing functions and regression tests
  • Students who want to understand how computer vision, AI, wireless communication, and encryption connect inside one system

What you need

  • One laptop with Python 3. Early steps use saved inputs with no GPU, YOLO, or live camera; the encryption step adds the cryptography library.
  • Lessons using a physical robot require a flat bounded space, direct supervision and an emergency stop within reach.
  • How the robot and accessories are arranged depends on how the student enrols, so it is confirmed during the consultation.

Frequently asked questions

Are wireless communication and encryption the same?

No. Wireless describes how a packet travels; encryption protects the message content. Students test JSON encoding, a Wi-Fi-like link, Fernet encryption and tamper detection, and action permission as four separate layers.

Can a student join with no coding experience?

Yes. The first step is a short program that turns button and number inputs into display and LED outputs. Elementary students then use roles and pictures, middle-school students trace values and state, and high-school students extend the same eight steps through functions and tests.

Does the robot run the student's own AI model?

Student AI predictions and policies run safely on the laptop first. A separate S1 Lab Python example demonstrates input, process, memory, LED, sound, and an explicit stop on the physical robot. Every diagram names which Python runtime executes where.

How is safety handled?

All eight laptop steps emit chassis=STOP. A lower threshold for a possible person can only trigger STOP or ALERT sooner, never approach. Communication loss, delay, tampering, and stale input also become HOLD or STOP. Physical lessons stay behind a separate Lab boundary with teacher supervision.

Is a laptop required?

Yes, to run the Python project and diagrams. The core course works on an ordinary Python 3 laptop, and saved inputs teach every fundamental concept without a GPU or live camera.

What ages is this course for?

Grades 4-12. Elementary students use role cards and saved scenes, middle-school students trace real bytes, state, and thresholds, and high-school students study modules, security boundaries, and tests. A teacher approves installation privileges and physical motion.

Does this lead to a portfolio?

Yes. Students keep eight runnable steps, 13 architecture diagrams, a false-positive/false-negative table, wireless-loss and ciphertext experiments, tests that prove safe stopping, and SystemTrace records. They present why one tick produced its output in age-appropriate language.

How is the robot and equipment arranged?

It depends on how the student enrols, so this is confirmed during the consultation. Where physical equipment is not used, the same objectives are covered through simulation and record analysis.

We set the depth by grade and Python experience

In the consultation, we choose role cards, data-and-state tracing, or module-and-test work as the starting depth. No pathway skips the distinctions among computer vision, AI, and AI agents or the safety standard. Consultation and placement test are free.

Related programs

Consult (02) 540-2922