GithubHelp home page GithubHelp logo

arachnid / boneio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from graycatlabs/pybbio

5.0 3.0 0.0 323 KB

A Python library for hardware IO support on the TI Beaglebone

License: Apache License 2.0

Shell 6.73% Python 93.27%

boneio's Introduction

************************************************************************
boneio - v0.3.1
Created: 12/2011
Authors: Alexander Hiam - [email protected] - www.alexanderhiam.com
         Nicholas Johnson - [email protected] - www.notdot.net
Website: https://github.com/arachnid/boneio

A Python library for hardware IO support on the TI Beaglebone.

This is a fork of PyBBIO (https://github.com/alexanderhiam/PyBBIO), modified
to act as a standard Python library instead of an arduino-like environment.

Copyright 2012 Alexander Hiam, Nicholas Johnson

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
************************************************************************

The goal of this library is to create a simple programming environment 
similar to the Arduino. At the moment it supports basic digital IO
through digitalRead() and digitalWrite() functions, as well as ADC
support through analogRead(). PWM and UART are on the way, so keep 
checking the Github page for updates.  

I am using the same pin names as are assigned to the BeagleBone's two
female expansion headers in the schematic, which can be found here:
  http://beagleboard.org/hardware/design/

The libraries directory is a place to put PyBBIO specific libraries. 
When PyBBIO is installed, the path to the libraries directory is added
to the installed configuration file. This way these libraries are stored
where they can be easily accessed and added to. The libraries in the 
directory can be imported using standard Python syntax after bbio is 
imported. This is demonstrated in tests/library_test.py using the example
library at libraries/example.py.

The python-mmap module is required and was not installed on my BeagleBone,
despite it usually being part of the standard Python modules. 
It can easily be installed by running at the BeagleBone shell:
  # opkg update; opkg install python-mmap

Python setuptools support is a work in progress.

Hardware access is acheived using a memory map of the special file /dev/mem, 
which is a map of the entire physical memory of the AM3358 ARM processor. 
The addresses of all the processor's memory registers, as well as details
on how to properly use them, can be found in the AM335x Technical Reference 
Manual (TI document spruh73c.pdf) which can be found here:
  http://www.ti.com/dsp/docs/dspsupporttechdocs.tsp?sectionId=3&tabId=409&docCategoryId=6&viewType=mostuseful&rootFamilyId=44&familyId=2920
Direct link:
 http://www.ti.com/litv/pdf/spruh73d

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.