This is a simple example to show how to use SwiftGPIO by @uraimo on a Raspberry Pi 2. The purpose is very simple: switch on/off or blink 3 LEDs connected to the board with two different GPIO.
Board with 3 LEDs and 2 resistances of 300ohm
cd BasicGPIO
swift build
sudo .build/debug/BasicGPIO VALUE
VALUE:
enum Command: Int {
case one
case two
case blink
}
Thanks to @uraimo, @iachievedit and @ubidefeo for the help to setup properly Swift, SwiftGPIO and the board 😃.
- Swift 3.0 on Raspberry Pi 2 and 3
- SwiftGPIO
- SwiftGPIO examples
- Trubles with RPi, Ubuntu and eth0? 👉solution