This package is heavily based on and would not be possible without SwiftyGPIO. This is not meant to be a replacement, more like an extra layer to make using Swift with rPi devices such as buttons, relays, LEDs, UART and LCDs easier. Support is currently limited as this is a hobby. Since SwiftyPi is made to work in conjunction with ApusRupus I have decided against implementing a delegate. You will have to actively poll each device in a loop for state. I may change this to implement the timer better.
I recommend visiting SwiftyGPIO and getting familiar with this API first. However, the goal to eventually be able to call many devices, so eventually SwiftyDevice is all you need to worry about.
.package(url: "https://github.com/doHernandezM/SwiftyPi.git", ._exactItem("0.1.30")),
public init(gpioPinName: String, theType: SwiftyPiType)
public typealias CompletionHandler = () -> Void
public var handler: CompletionHandler? = nil
public var bool: Bool public var int: Int public var mode: SwiftyPiMode
|Last commit: 1 week ago|