Skip to content

MacOS compatibitliy Fixes!#24

Open
abhistjain wants to merge 1 commit into
leap-hand:mainfrom
abhistjain:Mac_book_compatibility
Open

MacOS compatibitliy Fixes!#24
abhistjain wants to merge 1 commit into
leap-hand:mainfrom
abhistjain:Mac_book_compatibility

Conversation

@abhistjain

Copy link
Copy Markdown

What this PR does

LEAP Hand previously only worked out of the box on Linux and Windows.
This PR adds full macOS support with zero manual port configuration required.

Changes

python/main.py

  • Port detection is now OS-aware using platform.system()
    • macOS: auto-discovers /dev/tty.usbserial-* and /dev/tty.usbmodem* via glob — works on any Mac regardless of the chip serial number
    • Linux: tries /dev/ttyUSB0 through ttyUSB3
    • Windows: tries COM1 through COM19
  • Replaced the nested try/except chain with a clean loop over candidate ports
  • Added a clear RuntimeError if no port connects, listing all ports tried
  • Reduced default loop rate from 33 Hz to 20 Hz to reduce USB packet errors on macOS

MACOS_SETUP.md (new file)

  • Complete end-to-end setup guide written for first-time users
  • Covers: prerequisites, cloning, virtual environment, finding the device name, permissions, running, and what output to expect
  • Explains what /dev/tty.usbserial-XXXXXXXX actually means (common point of confusion)
  • Troubleshooting table covering every common error with cause and fix
  • Quick-reference checklist for each session
  • Full API reference with joint numbering diagram

python/readme.md

  • Restructured to consistent format across Ubuntu, Windows, and macOS sections
  • macOS quick-start now matches the same style as the other platforms
  • Links to MACOS_SETUP.md for the full walkthrough

readme.md

  • Added link to MACOS_SETUP.md under Software Setup

Tested on

  • MacBook Air (Apple Silicon, macOS 14) with LEAP Hand Lite via FTDI USB adapter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant