I was writing an iOS app to connect to a socket server. When I ran on the simulator, I kept getting error and disconnected immediately. The Error Code was 57, and Error Domain is NSPOSIXErrorDomain. I was scratching my head for awhile because I knew that I tested it and it was working when I first time running it.
After an hour of research, I found out the reason. When changing the network, I have to restart the iOS simulator. After I restarted the simulator, the socket connection was working again. FML! LOL!
It is not difficult to access the IOS address book in Swift, but I got a segmentation fault when getting contact list and put into an NSArray from an example I found on Stackoverflow.com
This is a quick guide for you to start for controlling Rapiro with RedBearLab BLE Nano and mobile device. If you want to know more technical detail, you can find it here.
Rapiro is a cute, affordable, and easy to assemble humanoid robot kit. Rapiro comes with an Arduino compatible controller board, and you can reprogram Rapiro with Arduino IDE easily. One of the coolest feature is that you can extend Rapiro‘s functionality by connecting other components to enhance Rapiro’s capabilities.
“Its limitless possibilities all depend on you.”
This time, I will show you how to control Rapiro with IOS devices through BLE connection. I will divide this tutorial in two parts.
First will show you how to connect Rapiro to RedBearLab’s BLE Nano Board, and run a simple test code to confirm the connection.
Then in the second part of tutorial, I will show you how to connect and turn your IOS devices into a remote control and to control Rapiro‘s action.