A minimal macOS application for controlling pan and tilt servos for the FAC1 Camera.
This controller is built using a native, no-nonsense, minimal Swift application, for which you can find the source code in this repository.
- Automatic USB-Serial Detection: Automatically finds and connects to USB-serial devices
- Dual Servo Control: Controls pan and tilt servos (hardcoded IDs: pan=6, tilt=4)
- Connection Status: Detailed status reporting for USB and individual servo connections
- Calibration: Calibrate the center point of the servos and toggle axis inversion to your liking
- Always on Top: Optional window mode to keep the controller always visible
- Minimal Interface: Simple arrow button controls (↑ ↓ o ← →)
- macOS 14.0 or later in theory
- FAC1 Camera
- Clone or download this project
- Open Terminal and navigate to the project directory
- Build the application:
swift build -c release- Run the application:
swift runOr build and run in development mode:
swift run FAC1-Controller- Connect your USB-to-serial adapter
- Power on your servos
- Launch the application
- The app will automatically search for and connect to available USB-serial ports
- ↑ (Up Arrow): Tilt up
- ↓ (Down Arrow): Tilt down
- O (Circular Button): Center Camera
- ← (Left Arrow): Pan left
- → (Right Arrow): Pan right
- Pan Servo ID: Hardcoded to ID 6
- Tilt Servo ID: Hardcoded to ID 4
- Always on Top: Check to keep the window always visible above other applications
- Reconnect: Manually reconnect to the USB-serial port
The application uses the following servo settings:
- Pan Servo ID: 6 (hardcoded)
- Tilt Servo ID: 4 (hardcoded)
- Baud Rate: 1,000,000
- Protocol: STS series (STS3250)
- Movement Step: 100 units per button press
- Speed: 200
- Acceleration: 50
- Position Range: 0 - 4095 (full 360°)
Servo IDs can be changed in ServoController.swift if needed.
- Check that servos are powered on
- Verify USB-serial adapter is connected
- Make sure servo IDs match the configured values
- Click "Reconnect" to retry connection
- Verify servo IDs are correct
- Check power supply to servos
- Ensure baud rate matches your servo configuration (default: 1,000,000)
- Try running the Feetech SDK ping example to test basic connectivity
- Note that the servos will ship with the same ID. You will need to program the IDs.
On macOS, you may need to grant permission to access the serial port:
# List available ports
ls /dev/cu.*
# The app will try to use cu.usbserial* or cu.usbmodem* devicesThis project uses the Feetech Servo SDK for Swift.
Copyright 2025, Timothy Ellis, Fyrby Additive Manufacturing & Engineering

