SwiftyBones3 is a Swift 3 framework for interacting with the GPIO, PWM and analog pins on the BeagleBone Black. This framework makes it very easy to interact with these pins and is the framework we will be working with in this chapter. While SwiftyBones is written for the BeagleBone Black, if you are using another board like the Raspberry Pi you can use the very good SwiftyGPIO framework: https://github.com/uraimo/SwiftyGPIO.
The reason that we have chosen to use the SwiftyBones framework over the SwiftyGPIO is that the SwiftyBones framework offers support for the analog and PWM pins as well as the GPIO pins. The analog and PWM pins are very useful when interacting with various sensors. SwiftyBones also comes with a build script that will help you build projects with multiple files since the Swift package manager is not installed, at this time, with the ARM version of Swift.
The instructions for installing SwiftyBones are on the SwiftyBones GitHub page https://github.com/hoffmanjon...