Coder Social home page Coder Social logo

pythonic-charlieplex's Introduction

pythonic-charlieplex

Python class for controlling SparkFun 8x7 LED Array with the Raspberry Pi utilizing RPi.GPIO (https://pypi.python.org/pypi/RPi.GPIO).

This is a single-file class written in Python 3 for controlling the the SparkFun 8x7 LED Array (https://www.sparkfun.com/products/13795) that is controlled by eight charlieplexed pins.

V0.0.0 is fully compatiable with the latest versions of both Python 2 and Python 3. It has been tested on the latest version of Raspbian Jesse, but should work with any Raspberry Pi Linux distro with RPi.GPIO installed.

#Repository Contents

  • charlie.py - source file for class Charlie
  • /examples - code examples utilizing charlie.py (currently being expanded)
  • README.md - this file
  • LICENSE.txt - license information
  • example-wiring.png - image of wiring to the Raspberry Pi

#Documentation

###Installing

Here are three ways to convienently get pythonic-charlieplex usable on your Raspberry Pi:

  1. Copy and paste contents of charlie.py into existing code: the class Charlie is short enough that you can easily paste it directly into your Python script.

  2. Place the file charlie.py in the same directory as your script: Placing the charlie.py file in within your script will enable you to call import charlie in your code.

  3. Copy charlie.py into directories usr/lib/python2.7/dist-packages and usr/lib/python3/dist-packages: simply copy the charlie.py file into the Python dist-packages directories. Any script locally run on your Raspberry Pi will then be able to import charlie.

###Wiring

In order to use the array with the Raspberry Pi, connect pins A-H to the GPIO. There's no need to add current-impeding resistors, as the LED array has them built in! An example layout on a breadboard is shown below. example-wiring.png

For more information about how charlieplexing works and how to wire your LED array, see SparkFun's excellent hookup guide to the LED array here: https://learn.sparkfun.com/tutorials/sparkfun-led-array-8x7-hookup-guide

###Help on charlie.py

For help on the usage of charlie.py, see /examples. For documentation on the methods of the Charlie class once charlie.py is installed, type import charlie and then help(Charlie) into the Python shell.

See /examples to see usage of charlie.py.

#License

This software is open source! Released under the MIT license. See LICENSE.txt for full details.

Initial release: 18-Jun-2016

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.