This is really helpful, though, I'm setting up my function similarly, and when it comes time for me to call it, I'm not sure whether I should be using 'self.connectedBean?.serialDataReceived()' or another method. when using self.connectedBena?.serialDataReceived()' I get the error "Value of type 'PTDBean' has no member 'serialDataReceived'"
Function:
func bean(bean: PTDBean!, serialDataReceived data:NSData) {
let strReceived: NSData = data
someData.append("'Temp': '(strReceived)'}" as NSString)
}
Any guidance for how to call the function once its set up?
I'm trying to read data from one of the digital pins. It's being serial.printed in my arduino code at a 30s interval.