The Arduino sketch code is currently set up for 8 Digital I/O pins, you can add more if needed.
Pin 5 on the Arduino101 is currently set up for a servo.
I am using this code to switch a mechanical relay to turn on a lightbulb, and turn a servo to unlock and lock a deadbolt.
Feel free to use this Arduino Sketch and make use of my SoftWork iOS app in my repositories.