Giter Site home page Giter Site logo

swift-raspberry-pi-adafruit-led's Introduction

Swift Raspberry Pi HT16K33 implementation

Swift implementation for accessing adafruit LEDs on a raspberry pi

Building on the work of https://github.com/uraimo/SwiftyGPIO and https://github.com/adafruit/Adafruit_Python_LED_Backpack/

To add swift support for HT16K33 driven LEDs (like these from Adafruit):

requirements

  • Raspberry PI
  • Raspbery PI running Unbuntu 16.04 Match
  • Adafruit HT16K33 i2c Interface for 8x8 matrix or Alphanumeric 14 segment display.
  • Swift 3.1

installation

add the following dependency to your Package.swift

.Package(url: "https://github.com/jrahaim/swift-raspberry-pi-adafruit-led.git", majorVersion: 1)

usage

Matrix8x8

import HT16K33

var matrix = Matrix8x8(port: 0x70, board: .RaspberryPi3)

matrix.setPixel(x: x, y: x, on: true, write: true)

AlphaNumeric14

import HT16K33

var a14 = AlphaNumeric14(port: 0x70, board: .RaspberryPi3)

a14.brightness(7)
a14.show("RsPi")

Supports

  • Blinking
  • Brightness
  • clearing

Other Devices connected to HT16K33

It should be pretty straight forward to get other LEDs working. These are the only 2 deivices I have on hand to test.

Disclaimer

I have no relationship with Adafruit other than being a customer.

swift-raspberry-pi-adafruit-led's People

Contributors

jrahaim avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.