SMART OBJECTS CAMERAS

Quick Start Cheat Sheet

OAK-D + Raspberry Pi 5

Everything you need to connect, test, and run detectors on the classroom Pis.
Print this or keep it open on your laptop during lab time.

NETWORK

Network Info

Camera Hostname SSH Command Access
Orbit orbit ssh orbit SSH (key-based) + VNC
Gravity gravity ssh gravity SSH (key-based) + VNC
Horizon horizon ssh horizon SSH (key-based) + VNC
Authentication: SSH key-based via SSH config (no password needed if configured).
Note: All three Pis have VNC, but only one user can hold the VNC desktop seat at a time.

Full cheatsheet →

CONNECT

Connect to Pi

SSH (Terminal Access)

ssh orbit      # Camera: Orbit
ssh gravity   # Camera: Gravity
ssh horizon   # Camera: Horizon

No password needed with SSH keys configured.

VNC (Desktop Access)

  • Open RealVNC Viewer
  • Connect to: orbit, gravity, or horizon
  • Login with your username and password

VS Code Remote (Recommended)

  • Mac users: Grant VS Code "Local Network" permission first
  • Ctrl+Shift+P → "Remote-SSH: Connect to Host"
  • Select: orbit, gravity, or horizon
  • Open folder: /home/[username]/oak-projects
Mac tip: System Settings → Privacy & Security → Local Network → VS Code

Full cheatsheet →

PYTHON

Python Environment

Always activate the shared virtual environment first:

cd ~/oak-projects
activate-oak

Your prompt should change to show (venv):

(venv) carrie@orbit:~/oak-projects $
What is activate-oak? It is a shell alias for source /opt/oak-shared/venv/bin/activate. This loads the shared Python environment with DepthAI and all dependencies pre-installed.

Full cheatsheet →

CAMERA

Quick Camera Test

Check if the OAK-D camera is connected:

python3 -c "import depthai as dai; devices = dai.Device.getAllAvailableDevices(); print(f'Found {len(devices)} camera(s)')"

Expected output:

Found 1 camera(s)
No output or error? Check USB connection, try a different port, or use a powered USB hub.
Project files live at: ~/oak-projects/ — contains venv/, person_detector.py, and log files.

Full cheatsheet →

DETECTION

Run Person Detector

python3 person_detector.py

Basic — console output only

python3 person_detector.py --display

With video display (requires VNC desktop)

python3 person_detector.py --log

With logging to file

python3 person_detector.py --threshold 0.7

Adjust sensitivity (0.0 – 1.0, default 0.5)

Stop any running script: Ctrl+C

Full cheatsheet →

COMMANDS

Common Commands

Task Command
Update system sudo apt update && sudo apt upgrade -y
Check memory free -h
Check CPU / processes htop
Check camera python3 -c "import depthai as dai; ..."
List USB devices lsusb
Reboot sudo reboot
Shutdown sudo shutdown -h now

Full cheatsheet →

TROUBLESHOOTING

Common Errors & Fixes

"No module named depthai"
Run activate-oak to load the virtual environment.
Camera not found
Check USB connection. Try a different port or a powered USB hub.
Permission denied (USB)
sudo udevadm control --reload-rules && sudo udevadm trigger
VNC black screen
Set resolution in raspi-config → Display Options.
VS Code "No route to host" (Mac)
Grant Local Network permission: Settings → Privacy → Local Network → VS Code
Script won't start
Check logs: journalctl -u person-detector -n 20
Can't ping Pi
Check network, try IP address instead of hostname.

Full cheatsheet →

SHORTCUTS

Keyboard Shortcuts

Terminal (SSH)

ActionKeys
Cancel running programCtrl+C
Clear screenCtrl+L or clear
Previous command arrow
Search historyCtrl+R
Logoutexit or Ctrl+D

VS Code

ActionKeys
Command PaletteCtrl+Shift+P
Open TerminalCtrl+`
Run CodeF5
SaveCtrl+S
FindCtrl+F

Full cheatsheet →

EDITING

Making Changes

1. Edit with VS Code (Recommended)

  • Connect via Remote SSH
  • Edit person_detector.py
  • Save (Ctrl+S)
  • Run in terminal

2. Edit on Pi directly (nano)

nano person_detector.py

Ctrl+O, Enter to save — Ctrl+X to exit

3. Create your own copy first

cp person_detector.py person_detector_myname.py
nano person_detector_myname.py
Best practice: Always make a personal copy before editing shared scripts. This avoids conflicts when multiple students use the same Pi.
Coordinate with your teammates before editing shared files. Each person should add their SSH key with ssh-copy-id orbit.

Full cheatsheet →