DigitalTools / SwiftyBuzz

Swift + Orange Pi + Buzzer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SwiftyBuzz

Swift + Orange Pi + Buzzer

Setup

Clone this repo

git clone https://github.com/toolshc/SwiftyBuzz

Go inside RGBSemaphore

cd SwiftyBuzz

Build (will show errors)

swift build

Patch code

In

Packages/CStatfs-1.0.0/module.modulemap

Replace

x86_64-linux-gnu

by

arm-linux-gnueabihf

Build

swift build

Run

sudo .build/debug/SwiftyBuzz

Buzzer will play Startwars melody

Special thanks to:

Swift for ARM, thanks to @iachievedit

SwiftyGPIO, thanks to @uraimo

Logic and melody based on rpi-examples by @leon-anavi

Musical notes frecuencies calculated based NoteFrecuency.swift by @NickEntin

About

Swift + Orange Pi + Buzzer


Languages

Language:Swift 100.0%