Giter Site home page Giter Site logo

scroll-phat-swift's Introduction

#scroll-phat-swift Join the chat at https://gitter.im/Sephiroth87/scroll-phat-swift

scroll-phat-swift is a Linux library to control Pimoroni Scroll pHAT for Raspberry Pi.

Snake

##Installation Package Manager is not functional on Raspberry Pi yet, so you'll have to do it manually for now. After cloning, compile your program adding the 2 system dependencies, the SMBus file and the scroll-phat one, like:

swiftc -o MyProgram -I ./SMBus/Packages/Ci2c -I ./SMBus/Packages/CioctlHelper ./SMBus/Sources/SMBus.swift ./Sources/ScrollpHAT.swift main.swift

You can look in the Examples folder for see how to build your program.

##Usage No need to import anything since the library is built together with your other sources. Create a ScrollpHAT object:

let pHAT = try ScrollpHAT()

to turn on/off an led use :

pHAT.setPixel(x: 0, y: 0, value: true)
try pHAT.update()

write a string:

try pHAT.writeString("SWIFT")

scrolling:

try pHAT.scroll()
try pHAT.scrollTo(0)

##TODO

  • Add missing functions (text, scrolling)
  • Add documentation
  • Support Package Manager

scroll-phat-swift's People

Contributors

sephiroth87 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.