         }
     }
 
-    func onChange(_ closure:(GPIO)->Void){
+    public func onChange(_ closure:(GPIO)->Void){
         intFuncChange = closure
         if intThread == nil {
             intThread = newInterruptThread()

        return res
    }

    func newInterruptThread() -> Thread {
        
        let thread = try! Thread {


    let spiId:String
    let isOutput:Bool

    public init(spiId:String,isOutput:Bool){
        self.spiId=spiId
        self.isOutput=isOutput
        //TODO: Check if available?
