Swift + Orange Pi + LEDs Semaphore

Published

Introduction: 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...

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

Share

    Recommendations

    • Planter Challenge

      Planter Challenge
    • Make it Move Contest

      Make it Move Contest
    • Casting Contest

      Casting Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    Comments