Luke Irvin
Luke Irvin

Reputation: 1249

Log Data Sent from RFDuino

My RFDuino is sending data every 2 seconds.

I can see what's being sent via the Arduino Serial manager but I'd like to log this out in Xcode.

What method do I need to use to NSLog this?

Upvotes: 0

Views: 104

Answers (1)

Greg Lukosek
Greg Lukosek

Reputation: 1792

Set RFDuinoDelegate to your view. DidReceive method should be called automatically with the data been sent from the rfduino

Example here with receiving string data in Swift

func didReceive(data: NSData!) {

    var stringData: String = NSString(data: data, encoding: NSUTF8StringEncoding)! as! String
}

Upvotes: 0

Related Questions