Control OWI Robot Arm with Swift
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
SwiftArm.xcodeproj
SwiftArm
README.md

README.md

SwiftArm

Controls the OWI robot arm with Swift 3.

Example:

let arm = OWIRobot()
arm.light(on: true)
arm.light(on: false)

arm.allStop()

arm.moveElbow(direction: .up)
arm.moveElbow(direction: .down)
arm.moveElbow(direction: .none)

arm.moveShoulder(direction: .up)
arm.moveShoulder(direction: .down)
arm.moveShoulder(direction: .none)

arm.moveWrist(direction: .up)
arm.moveWrist(direction: .down)
arm.moveWrist(direction: .none)

arm.openGrip()
arm.closeGrip()
arm.stopGrip()

arm.rotateBase(direction: .clockwise)
arm.rotateBase(direction: .counterClockwise)
arm.rotateBase(direction: .none)

Dependencies

Requires libusb to be installed. On Raspberry Pi you can do that with:

sudo apt-get install libusb-1.0

On Mac OS X do:

brew install libusb

You are using brew, aren't you? ;)

References

Two references helped me to get this working