Accel Thinking

AIADEV · PHYSICAL COMPUTING

Gate Bot

A smart barrier gate on the UNIHIKER M10: an ultrasonic sensor spots arrivals, a servo raises the arm, and a four-state machine enforces one hard rule — the gate never lowers on anyone.

PROJECT AT A GLANCE

Course format
8 × 120-minute sessions
Hardware
UNIHIKER M10
Level
L1 · Smart Devices
Prerequisite
Python L1 (Programming Foundations)

WHAT YOU WILL WORK TOWARD

A gate that thinks before it moves.

What the finished device does — and what you will be able to explain.

WIRE

First real wiring

Connect an ultrasonic sensor and a 9g servo through safe 3.3V Gravity ports — no soldering.

CONTROL

A state machine you can explain

Closed, opening, open, closing: four states with hysteresis debounce and hold timing.

PROTECT

Safety as a requirement

The gate never lowers while something is near — a rule you encode, test, and defend in your demo.

PROJECT ROADMAP

Eight 120-minute sessions from kickoff to demo day.

WEEK 1

Project Kickoff and Hardware Readiness

Meet the M10, set up the dev chain, and run the first program.

WEEK 2

Screen GUI and Onboard Inputs

Build the touch-screen status page and wire up the onboard buttons.

WEEK 3

Sensors and Wiring

Connect the URM09 ultrasonic sensor over Gravity and read distances.

WEEK 4

Actuators and the Control Loop

Drive the 9g servo smoothly and close the sense–decide–act loop.

WEEK 5

The Gate State Machine

Four states, hysteresis, hold timing — and the never-lower-on-anyone rule.

WEEK 6

Testing and Debugging Without Hardware

Mock the sensor and servo, then pytest the state machine on desktop.

WEEK 7

Deployment, User Testing, and Reproducible Delivery

Auto-start, event logging to CSV, and a reproducible project package.

WEEK 8

Presentation and Reflection

Trigger the gate live and defend your safety design.

Every project ships two builds: a starter you open in week 1, and a teacher reference build. The flow — prepare, build, test, checkpoint, present — is the same across all Physical Computing courses.

CONCEPT PREVIEW

What it looks like when it runs.

OPEN
DISTANCE87 cm
SERVO90°
SAFETYCLEAR

The status screen while the arm is up: distance, servo angle, and the all-clear safety flag.

Concept UI for illustration — each student's finished device will look a little different.

THE BUILD

What you ship, and what it runs on.

An auto-starting gate controller with a live status screen and a CSV event log.

Board
UNIHIKER M10 (RK3308, Python 3.7)
Sensors
URM09 ultrasonic (Gravity, 3.3V-safe)
Actuators & output
9g servo · buzzer · status LED · touch screen
Extras
Auto/manual mode button · CSV open/close log

AI-assisted development, on real hardware.

The workflow is the same as in our software projects — plan with AI, review what it suggests, and test it yourself. Hardware adds one more skill: knowing whether a bug lives in the code, the wiring, or the physical world.

PLAN

Break the build into steps

Use AI to decompose the project, then check the plan against what the board and sensors can actually do.

REVIEW

Read every line AI writes

AI drafts, you review. Pin numbers, timing, and thresholds are your responsibility — the device does what you ship.

TEST

Test off the board, then on it

Desktop mock tests catch logic bugs early; on-device runs catch the rest. You learn to tell the difference.

AI use is disclosed in project work. If an AI service is unavailable or its answer is unsuitable, students continue with course examples, instructor guidance, and their own tests.

PILOT CLASSES FORMING

Try a Physical Computing course.

These courses are new — pilot classes form first. Leave your details and we will invite you to the first available session, or check your Python readiness before you talk to us.