Introduction: Swift + Orange Pi + LEDs Semaphore

Let's give life to a sequence of blinking LEDs.

Our Red, Green and Blue LEDs will go on and off in a sequential way.

We will use Swift language, and will run this on linux

Step 1: Step 1: Orange Pi GPIO

Picture of Step 1: Orange Pi GPIO

We will use 4 pins:

  • PA6: Blue LED
  • PA1: Green LED
  • PA0: Red LED
  • Ground

Step 2: Step 2: LEDs on BreadBoard

Picture of Step 2: LEDs on BreadBoard

Let's place the LEDs, connecting the cathodes to the Ground.

Anodes will be connected to the pins through jumper cables. Protect the LEDs with resistors.

Avoid errors using Red, Green and Blue color cables.

Step 3: Step 3: Chip + Code

Install Linux using an SD Card, I recommend SD Class 10 Ultra 1

I am using Armbian Jessie Server. Get Armbian

Get Swift 3.0 for ARM

Get code from

Let's build the executable using: swift build

Then run using super user privileges: sudo .build/debug/RGBSemaphore


About This Instructable




Bio: I love technology, have studied informatics engineering, started postgrade in innovation. Love coding, researching, learning new things, build things, open objects and machines :) Flamenco and ... More »
More by Tuls:Swift + Orange Pi + LEDs SemaphoreSpace for Tools at Side of the DeskCurtain hangers as curtain ties
Add instructable to: