Latest 0.2.0
Homepage https://github.com/ioveracker/WebIOPiSwift
License MIT
Platforms ios 8.0, watchos 3.0
Authors

Build Status
Version
License
Platform
[Swift Version]()

WebIOPiSwift is a Swift 3 library that wraps the WebIOPi REST API in a nice Swift package. It makes communicating with the GPIO pins on your Raspberry Pi from Swift code simple.

Example

let pi = WebIOPi(host: "http://raspberrypi.local:8000")
pi.GPIO.setFunction(.out, pin: 3) { status in
  if status == .ok {
    pi.GPIO.setValue(.on, pin: 3) { status in
      if status == .ok {
        print("Pin 3 is now outputting a HIGH signal.")
      }
    }
  }
}

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

A Raspberry Pi running WebIOPi.

Installation

WebIOPi is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "WebIOPi"

Roadmap

v0.1.0 (Current)

Basic GPIO functions.

  • [x] Get GPIO configuration
  • [x] Get and set pin function
  • [x] Get and set pin value
  • [x] Send pulse to a pin
  • [x] Send a bit sequence to a pin

v1.0.0 (Future)

All API calls exposed.

  • [ ] PWM
  • [ ] Macros
  • [ ] Better error handling

Author

Isaac Overacker

License

WebIOPi is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "WebIOPi",
    "version": "0.2.0",
    "summary": "A Swift wrapper for the WebIOPi API.",
    "description": "Interact with your Raspberry Pi running WebIOPi from Swift!",
    "homepage": "https://github.com/ioveracker/WebIOPiSwift",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Isaac Overacker": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ioveracker/WebIOPiSwift.git",
        "tag": "0.2.0"
    },
    "social_media_url": "https://twitter.com/ioveracker",
    "platforms": {
        "ios": "8.0",
        "watchos": "3.0"
    },
    "source_files": "WebIOPi/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This