Swift + Orange Pi + LEDs Semaphore

About: 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 reggae move my...

Intro: 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

We will use 4 pins:

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

Step 2: 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 github.com/adagio/RGBSemaphore

Let's build the executable using: swift build

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



    • Tiny Home Contest

      Tiny Home Contest
    • Fix It! Contest

      Fix It! Contest
    • Furniture Contest 2018

      Furniture Contest 2018