SMART OBJECTS: THE SMART CLASSROOM

Development Workflow

Smart Objects Cameras

SVA MFA Interaction Design · Winter 2026
Edit locally → Copy to Pi → Run on Pi

ARCHITECTURE

Two Machines, One Workflow  KEY CONCEPT

YOUR LOCAL COMPUTER  LOCAL

smart-objects-cameras/
  ├── person_detector.py
  ├── fatigue_detector.py
  ├── gaze_detector.py
  ├── discord_bot.py
  ├── utils/
  └── README.md
  • Edit code here
  • Test logic here
  • Commit to GitHub here

RASPBERRY PI  REMOTE

~/oak-projects/
  ├── person_detector.py
  ├── discord_notifier.py
  ├── .env          ← never in GitHub!
  ├── latest_frame.jpg
  └── camera_status.json
  • Run code here
  • Camera connected here
  • Only files you need
LOCAL scp (copy files) PI

Full guide →

INITIAL SETUP

Step 1: Clone Locally, Create Folder on Pi

On your local computer  LOCAL

1 Clone the GitHub repository
# Clone the repository
git clone https://github.com/[your-org]/smart-objects-cameras.git
cd smart-objects-cameras

On the Raspberry Pi  REMOTE

2 SSH in and create the project directory
# SSH into Pi
ssh orbit   # or gravity, or horizon

# Create project directory
mkdir -p ~/oak-projects
One-time setup. You only need to do this once per computer and once per Pi.

Full guide →

COPY FILES

Step 2: Copy Files to Pi  LOCAL

Run these commands from your local computer (not on the Pi!):

# Navigate to your local repo
cd ~/path/to/smart-objects-cameras

# Copy the files you need
scp person_detector_with_display.py orbit:~/oak-projects/
scp discord_notifier.py orbit:~/oak-projects/

# For fatigue/gaze, also copy the utils folder
scp -r utils orbit:~/oak-projects/
Replace orbit with gravity or horizon for other Pis.

More scp patterns:

scp file.py orbit:~/oak-projects/  # single file
scp -r utils orbit:~/oak-projects/  # entire folder
scp file1.py file2.py orbit:~/oak-projects/  # multiple files

Full guide →

ENVIRONMENT

Step 3: Create .env File  ON THE PI

Already configured (DO NOT MODIFY)

# These are set on each Pi:
DISCORD_WEBHOOK_URL=...
DISCORD_APPLICATION_ID=...
DISCORD_PUBLIC_KEY=...
DISCORD_BOT_TOKEN=...
# (OrbitBot / GravityBot / HorizonBot)

Check with: ls ~/oak-projects/.env

What you add (optional)

# Edit the existing .env:
nano ~/oak-projects/.env

# Add at the bottom:
DISCORD_USER_ID=your_discord_user_id
DISCORD_DM_BOT_TOKEN=your_dm_bot_token

Then secure: chmod 600 ~/oak-projects/.env

NEVER commit .env to GitHub! It contains secret tokens.

Full guide →

RUN

Step 4: Run Your Code  ON THE PI

Every time you want to run a script on the Pi:

$ ssh orbit
$ activate-oak
$ cd ~/oak-projects
$ python3 person_detector_with_display.py --display
Remember: Always run activate-oak first to load the shared Python environment. You should see (venv) appear before your prompt.

Tip: Use hostname to verify you are on the Pi (shows orbit, gravity, or horizon).

Full guide →

DEVELOPMENT CYCLE

Step 5: Making Changes

The edit-copy-run loop you will repeat every time you change code:

1 Edit code on your laptop  LOCAL
nano person_detector_with_display.py  # or use VS Code
2 Copy updated file to Pi  LOCAL
scp person_detector_with_display.py orbit:~/oak-projects/
3 Run updated code on Pi  ON THE PI
activate-oak && cd ~/oak-projects && python3 person_detector_with_display.py --display
Repeat from Step 1

Full guide →

FILE DEPENDENCIES

Which Files to Copy

Each detector needs specific files on the Pi. Copy only what you need:

DetectorFiles to CopyNotes
Person Detection person_detector_with_display.py
discord_notifier.py
Notifier only if using --discord
Fatigue Detection fatigue_detector.py
utils/ folder
discord_notifier.py
Copy utils/ with scp -r
Gaze Estimation gaze_detector.py
utils/ folder
discord_notifier.py
Copy utils/ with scp -r
Discord Bots discord_bot.py
discord_dm_notifier.py
Public bot + personal DM bot
Shared dependency: Fatigue and Gaze both need utils/. Copy it once and both detectors can use it.

Full guide →

COMMON MISTAKES

What Not to Do  WATCH OUT

Cloning the repo on the Pi
Don't run git clone on the Pi. It creates unnecessary files and risks accidentally committing .env to GitHub. The repo belongs on your local computer only.
Forgetting to copy updated files
You edit on your laptop but forget to scp to the Pi. The Pi still runs the old version! Always run scp after every edit before re-running on the Pi.
Committing .env to GitHub
Never run git add .env. The .env file contains secret tokens (Discord bot tokens, webhook URLs) that would be publicly visible on GitHub.
Golden rule: Repo on laptop, .env on Pi, never the other way around.

Full guide →

QUICK REFERENCE

Summary

ActionWhereCommand
Clone repo LOCAL git clone ...
Edit code LOCAL Use your favorite editor
Copy files LOCAL scp file.py orbit:~/oak-projects/
Create .env PI nano ~/oak-projects/.env
Run scripts PI activate-oak && python3 script.py
Commit changes LOCAL git add, git commit, git push
Check which machine Either hostname
VS Code Remote SSH alternative: Install the "Remote - SSH" extension, connect to orbit, and edit files directly on the Pi. No scp needed — drag and drop between local and remote windows works too.

Remember: Repo on laptop, files on Pi, run on Pi!